Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Python3 #264

Open
wants to merge 135 commits into
base: develop
Choose a base branch
from
Open

Python3 #264

wants to merge 135 commits into from

Conversation

Renatogmez
Copy link

No description provided.

shayne and others added 30 commits February 23, 2011 17:59
which gives you an access_token response for a 
client who is already authorized.
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
… 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.
heatonjb and others added 29 commits April 24, 2014 10:52
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
@facebook-github-bot
Copy link

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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.