This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Python3 #264
Open
Renatogmez
wants to merge
135
commits into
develop
Choose a base branch
from
python3
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Python3 #264
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.5 support.
which gives you an access_token response for a client who is already authorized.
…s error if scope is blank.
…f the call back uri.
Fixed a typo and updated docs
Added captions to Media model objects
The Instagram API is signed with a GeoTrust Global CA. Unfortunately this CA root certificate is not part of the default cacert.txt file that ships with httplib2. Rather than ship the certificate file, let's just ignore the SSL validation issue. Once the upstream bug is fixed, http://code.google.com/p/httplib2/issues/detail?id=156 we can revert this change.
Check for that before constructing the Point Without this small fix, repeatedly doing a query will eventually result in: >>> from instagram.client import InstagramAPI >>> instagram_api = InstagramAPI(**{'client_id': 'something', 'client_secret': 'hidden'}) >>> instagram_api.media_popular() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "instagram/bind.py", line 130, in _call return method.execute() File "instagram/bind.py", line 121, in execute content, next = self._do_api_request(url, method, body, headers) File "instagram/bind.py", line 97, in _do_api_request obj = self.root_class.object_from_dictionary(entry) File "instagram/models.py", line 49, in object_from_dictionary new_media.location = Location.object_from_dictionary(entry['location']) File "instagram/models.py", line 95, in object_from_dictionary if entry['latitude']: KeyError: 'latitude' >>>
Returning the access_token is useful, but even more important is knowing which user has granted us access.
The method was not specified, so it defaults to GET. And, whilst the GET seems to work, it actually does not.
As well as returning the access_token, return who it is associated to
Relationship changes are a POSTed.
Not all Locations have latitude / longitude.
added a flag 'return_json', to return the raw api response instead of media objects
Disable SSL validation.
… to args. This makes it available to the location object as location.point. When being passed in the args it was not being added to the Location class because the args were not being iterated over.
…dvonlehman-master Conflicts: README.md
…johnboiles-master
bottle-session needs to be installed for the sample app to work.
An instance of redis is needed for bottles-session to work.
Update README.md Sample app section
…ram into henninge-pagination-format Conflicts: setup.py
Now we can enable the signed header by passing the `client_ips` keyword argument to the Instagram.Client constructor. c = client.InstagramAPI( access_token=access_token, client_ips="1.2.3.4", client_secret="CS" ) c.follow_user(123) # => call API with X-Insta-Forwarded-For signature. If you do not set the client_ips nor client_secret, X-Insta-Forwarded-For is not sent.
For more information about this url, check the documentation: - http://instagram.com/developer/endpoints/media/#get_media_by_shortcode
add python 3 support
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.