You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.
Valid projects are 'try' and 'mozilla-central'. The following work fine.
coreapi get https://treeherder.mozilla.org/docs/
coreapi action project push list -p project=try
coreapi action project push list -p project=mozilla-central
curl "https://treeherder.mozilla.org/api/project/try/push/"
curl "https://treeherder.mozilla.org/api/project/mozilla-central/push/"
The python code (click 'Source Code' in lower left and select python) doesn't work.
test.py (nearly exactly from doc page, just setting project key)
#!/usr/bin/env python
import coreapi
# Initialize a client & load the schema document
client = coreapi.Client()
schema = client.get("https://treeherder.mozilla.org/docs/")
# Interact with the API endpoint
action = ["project", "push > list"]
params = {
"project": "try",
#"project": "mozilla-central",
}
result = client.action(schema, action, params=params)
print(result)
➜ ~ ./test.py
Traceback (most recent call last):
File "./test.py", line 14, in <module>
result = client.action(schema, action, params=params)
File "/usr/local/lib/python2.7/site-packages/coreapi/client.py", line 163, in action
link, link_ancestors = _lookup_link(document, keys)
File "/usr/local/lib/python2.7/site-packages/coreapi/client.py", line 38, in _lookup_link
raise exceptions.LinkLookupError(msg % (index_string, repr(key).strip('u')))
coreapi.exceptions.LinkLookupError: Index ['project']['push > list'] did not reference a link. Key 'push > list' was not found.
➜ ~
The text was updated successfully, but these errors were encountered:
Versions I'm using:
API I'm trying to use: https://treeherder.mozilla.org/docs/#project-push-list
github repo for the project: https://github.com/mozilla/treeherder
Valid projects are 'try' and 'mozilla-central'. The following work fine.
The python code (click 'Source Code' in lower left and select python) doesn't work.
test.py (nearly exactly from doc page, just setting project key)
The text was updated successfully, but these errors were encountered: