Corresponding to the official DOC, I prepare the following URL:
https://api.github.com/repos/gooddata/gooddata-python-sdk/pulls?per_page=10&page=1&sort=updated&direction=asc&state=all&q=updated:%3E=2022-06-01
It returns the first 10 pull requests in this (public) repo, first with updated at 2021-08-05T12:55:43Z.
It seems that the following part of the query does not work:
&q=updated:%3E=2022-06-01
I tried to utilize the existing python library for integration with Github API:
https://github.com/PyGithub/PyGithub, but there is no support for limiting the updated field.
I think with PyGitHub my approach would be to get all open PRs, sort by updated in ascending/descending order whichever you prefer.
In this example https://pygithub.readthedocs.io/en/latest/examples/PullRequest.html?highlight=pr#get-pull-requests-by-query
I'd change sort="updated" and direction="desc" so:
repo.get_pulls(state="open", sort="updated", direction="desc")
I'm unfamiliar with gooddata so cannot help there sorry.
Related
I am exploring how to search and filter tweets using the Twitter API version 2 which as of this writing has been newly released. The documentation for this particular endpoint is available here.
I tried successfully searching for the following query:
https://api.twitter.com/2/tweets/search/recent?query=puppy
As I needed to be more specific, I checked out v1.1 docs for rules and filtering and tried to look for tweets containing puppy images (filter:image) and no retweets (-filter:retweets) but I could not get the query in v2 (preferably) or v1.1 working with postman even though I tried percent-encoding for the special characters.
It is also not clear to me from the documentation (though mentioned in the docs) how to specify a certain language like English (lang=english) and a certain distance in the query "37.781157,-122.398720,1mi"
Does somebody know how to pass it into the query?
For language filter you can refer the post
https://community.postman.com/t/define-the-language-of-tweets/20643
But I am not sure about the image filter. But in recent times a developer sean.keegan from Postman is talking more about twitter API's in Postman. Please do check out https://community.postman.com/search?q=twitter and https://www.youtube.com/watch?v=ySbLo13Fk-c
I hope these will be helpful for you!!
There is bit of a confusion, wondering if somebody can help me with this.
Here is an example which is a year old and uses goapp with polymer and endpoint
https://github.com/googlesamples/cloud-polymer-go
Here is a recent example using gcloud
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/appengine_flexible/endpoints
Both are different as google changed its approach.
As per second example, I am able to create endpoint functions which uses json for input and output. However there are 2 problems
1st. It is throwing error if I put functions in different file under same package. It works when I run go run .go. but then I dont understand how app.yaml come into picture. I think this url /_ah/spi/. should work
2nd. I am using postman app to check the request and response from endpoint. Is there a better way? I thought google does provide a platform to test endpoint.
Is there any example which implements examples similar to 1st one with new libraries?
looking forward for your help. Thanks.
I'm trying to figure out a way to create orders via API (the ones that show up under https://app.goshippo.com/orders/), but seems like api docs dont really explain how to do so, and the only thing thats available is to create shipping labels. The libraries dont have any functions that will point me to this direction either. Is it even possible to make a call to the api for orders ?
Also, if this is not possible, how can I make goShippo send me a request for lets say a CSV, to sync all orders ?
PS: this is a custom build
Thanks
Feel free to use our order endpoint /v1/orders, but it is currently in beta version. The behavior of this endpoint may change (fields, error messages). We will update the following gist according to any modification that we make.
You can find more details about the endpoint at https://goshippo.com/docs/orders
The following Gist shows you how to POST on the Order endpoint.
https://gist.github.com/mnowik/59d2d550107b77cb31bf79b6b75d6e27
Fields with * are not active yet.
I'm making a call to GET service/api/version?nodeRef={nodeRef}, but I want to limit the query to just the most recent version. I found this StackOverflow post which suggests the use of &filter={filterQuery?} to filter results, but that looks like it only applies to the people query method. Is there something like this for the version method?
Before answering your specific query, a general point. Alfresco community is open source, and almost all of Alfresco Enterprise is too, so for many queries around this your best bet is simply to go and check the source code yourself! The rest APIs are held in the projects/remote-api
Looking in there, you can see that the versions webscript returns all versions for a given node. It's fairly fast to do that, so calling that and getting the most recent one isn't the end of the world
Otherwise, the slingshot node details api at http://localhost:8080/alfresco/service/slingshot/doclib2/node/{store_type}/{store_id}/{id} (add the parts of the noderef into the URL) will return lots of information on a node quickly, including the latest version. In the JSON returned by that, inside the item key is something like
"version": "1.7",
Which gives you the latest version for the node
Some of the listing and search APIs will also include the version, but those are likely to be quite a bit more heavyweight than just getting the version history of a node
I'm trying to find a way to get all the comments from a particular build in TeamCity via the Rest API. How can one do that?
http://teamcity:port/httpAuth/app/rest/changes?locator=build:(id:77651)&fields=count,change:(version,username,date,href,comment,files)
Via this URL, one can list out in custom fashion exactly the fields they wish to return. I don't think this is documented, i got this from their support folks. Enjoy!
PS - There are other examples out there which iterate over each change, this lists out all the changes for a particular build id in one place, for parsing.