| 159 | |
| 160 | # Get all versions of the algorithm, with the given filters |
| 161 | def versions(self, limit=None, marker=None, published=None, callable=None): |
| 162 | kwargs = {} |
| 163 | bools = ["True", "False"] |
| 164 | if limit: |
| 165 | kwargs["limit"] = limit |
| 166 | if marker: |
| 167 | kwargs["marker"] = marker |
| 168 | if published: |
| 169 | p = published |
| 170 | kwargs["published"] = str(p).lower() if str(p) in bools else p |
| 171 | if callable: |
| 172 | c = callable |
| 173 | kwargs["callable"] = str(c).lower() if str(c) in bools else c |
| 174 | # Get Algorithm versions |
| 175 | url = '/v1/algorithms/' + self.username + '/' + self.algoname + '/versions' |
| 176 | response = self.client.getJsonHelper(url, **kwargs) |
| 177 | return response |
| 178 | |
| 179 | # Compile an algorithm |
| 180 | def compile(self): |