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

; #260

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

; #260

wants to merge 213 commits into from

Conversation

akjones07
Copy link

Fixes #259

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.
Jon Heaton and others added 29 commits March 17, 2015 14:01
Return empty array for media.tags if tags do not exist instead of Attrib...
… introduced in 79c41e1

  - All tests were previously failing with error `TypeError: object of `NoneType` has no len()`:
    https://travis-ci.org/Instagram/python-instagram/jobs/58567079
  - If we weren't given a `client_secret`, we don't have a secret to sign the request with, so `_signed_request()`
    should just return the empty string.
…ient_secret

Fixes all tests failing because of `None` secret passed to `hmac.new`
Return empty array instead of AttributeError when media has no tags.
fix _encode_multipart bug
… allow us to build a path without the format

This is necessary because unlike the other endpoints, `media/shortcode/{shortcode}.json` 404s
  and should just be `media/shortcode/{shortcode}

```python
api = InstagramAPI(access_token=access_tken)
api.media_shortcode('os1NQjxtvF')
```
raises ```InstagramClientError: (404) Unable to parse response, not valid JSON.```

```python
api = InstagramAPI(access_token=access_tken)
api.media_shortcode('os1NQjxtvF')
```
returns ```Media: 933107621857404944_231015329` as expected.
… are supported by user_recent_media endpoint.
code highlighting for the pip command.
Make registered subscription callbacks tied to the reactor instance.
Add exhaustive pagination example to README
@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