Trying to pull commits over a period of time - api

i tried using gh api to retrieve commits with the following code
gh api repos/apache/airflow/commits
and it returns me only commits done for the past 3 days.
How do I retrieve for like maybe past 3 months?
I saw in the documentation that there is since and until. What should be the syntax?
Thank you.

If anyone is wondering, I have solved the issue using curl.
startdate='2022-02-26';
enddate='2022-08-27';
json_string=os.popen("curl -sS \"https://api.github.com/repos/apache/airflow/commits?since="+startdate+"T00:00:00Z&until="+enddate+"T23:59:59Z&per_page=100&page="+str(i)+"\"").read();

Related

GitHub REST API: Efficiently Fetch Comment Lists from Mutliple Issues

I want to use the GitHub REST API to fetch "a list of comments made in repository X since date Y".
GitHub does not appear to have a specific API method designed to do what I want efficiently.
The repos/comments method appears to return git commit comments, not GitHub issue comments.
The issues/comments method will let me fetch comments made on a single issue.
The best I've been able to come up with is querying for issues (which will include PRs) for a date range, and then making a single API call per issue. This means if there's been activity in 20 issues, I'm making 21 API calls (one for the list of issues and then twenty for each issue to get the comments).
This feels inefficient. Is there a way to get the information I want (all issue comments made on a repository within a date range) using fewer API calls?

branch.io +is_first_session is giving random values every time I delete and reinstall the app

+is_first_session is giving random values every time I delete and reinstall the app. I tried doing this more than 20 times.
I have submitted 2 tickets in this regard.
Thank you for reaching out! More information about your issue will be needed. Please submit a ticket to the Branch Support team at support#branch.io and we will be happy to investigate.

Why is BigCommerce API POST request not getting through?

I've been for months trying to get more complex type of POST requests to go through and somehow I've never been able. Those like creating a product or a brand are always easy, but when u get to creating complex-rules and modifiers your API seems to close all the doors...
I'm trying to create a Complex-Rule for changing the image when two or more option values are selected. I tried every possible combination of what I think could be the needed values and nothing. Is it possible that I'm misinterpreting what the array of inline_response_200_19_conditions are and how to use them?
This is the response I get every time...
Any help here would be very much appreciated and would save me from doing more than 25.000 combinations and image uploads by hand... :/
Thanks a lot!

Getting tweets from a certain period where user was mentioned

I'm using the twitter API and would like to get all tweets from a given time period where a given user was mentioned.
I tried the search API with the until parameter where I could get the tweets for the previous 7 days from the date which is not the best, but fine. However, in this case the API only returns the number of tweets without the details.
Any ideas how to do it or what I'm doing wrong?
Thanks!
Strange, https://dev.twitter.com/rest/reference/get/search/tweets says it should return tweet objects. Are you sure you implemented it correctly? Which library are you using? Maybe there is a fault in its implementation. Another library could therefore be the solution.
Don't know whether this satisfies your needs, but you could also try to use the GET statuses/mentions_timeline API . This API returns up to 800 tweets in which the user was mentioned.
EDIT, based on the comments on this post:
You are doing 2 things wrong, namely:
As stated in the documentation the until parameter has a 7 day limit. So you can only retrieve up to 7 days of tweets.
Furthermore, you are making incorrect use of the since parameter. The since parameter specifies since this tweet (so the id of the tweet), not since this date.
Please read the documentation carefully. It is written very precisely and contains all the answers you probably need.

Instagram comment API

i'm wanting to run a contest on Instagram where the user enters by leaving a comment - how would I go about getting past the 150 api limit?
Any paid solutions out there? Anyway I can get the comments and add them to a spreadsheet in real time?
Thanks
The Instagram comments endpoint (https://api.instagram.com/v1/media/{media-id}}/comments?access_token=ACCESS-TOKEN) will only return you the most recent comments, so I would recommend setting up a cron job to request the comments for the media you are using. Every minute would probably be sufficient, but you can go faster if you think more than 150 comments will get added every minute. Since they return you the most recent comments with each request, you can cache everything if you start making requests as soon as your photo posts.