Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: 3.0.0 #210

Merged
merged 43 commits into from
Jun 17, 2013
Merged

WIP: 3.0.0 #210

merged 43 commits into from
Jun 17, 2013

Conversation

michaelhelmick
Copy link
Collaborator

3.0.0

  • Changed twython/twython.py to twython/api.py in attempt to make structure look a little neater
  • Removed all camelCase function access (anything like getHomeTimeline is now get_home_timeline)
  • Removed shorten_url. With the requests library, shortening a URL on your own is simple enough
  • twitter_token, twitter_secret and callback_url are no longer passed to Twython.__init__
    • twitter_token and twitter_secret have been replaced with app_key and app_secret respectively
    • callback_url is now passed through Twython.get_authentication_tokens
  • Update test_twython.py docstrings per http://www.python.org/dev/peps/pep-0257/
  • Removed get_list_memberships, method is Twitter API 1.0 deprecated
  • Developers can now pass an array as a parameter to Twitter API methods and they will be automatically joined by a comma and converted to a string
  • endpoints.py now contains EndpointsMixin (rather than the previous api_table dict) for Twython, which enables Twython to use functions declared in the Mixin.
  • Added OAuth 2 authentication (Application Only) for when you want to make read-only calls to Twitter without having to go through the whole user authentication ritual (see docs for usage)
  • Added obtain_access_token to obtain an OAuth 2 Application Only read-only access token
  • construct_api_url now accepts keyword arguments like other Twython methods (e.g. instead of passing {'q': 'twitter', 'result_type': 'recent'}, pass q='twitter', result_type='recent')
  • Pass client_args to the Twython __init__ to manipulate request variables. client_args accepts a dictionary of keywords and values that accepted by requests (http://docs.python-requests.org/en/latest/api/#sessionapi) [ex. headers, proxies, verify(SSL verification)] and the "request" section directly below it.
  • Added get_application_rate_limit_status API method for returning the current rate limits for the specified source
  • Added invalidate_token API method which allows registed apps to revoke an access token presenting its client credentials
  • get_lastfunction_header now accepts a default_return_value parameter. This means that if you pass a second value (ex. Twython.get_lastfunction_header('x-rate-limit-remaining', 0)) and the value is not found, it returns your default value

To-do

## 3.0.0

- Changed ``twython/twython.py`` to ``twython/api.py`` in attempt to
make structure look a little neater
- Removed all camelCase function access (anything like
``getHomeTimeline`` is now ``get_home_timeline``) Fixes #199
- Removed ``shorten_url``. With the ``requests`` library, shortening a
URL on your own is simple enough
- ``twitter_token``, ``twitter_secret`` and ``callback_url`` are no
longer passed to ``Twython.__init__`` Fixes #185
    - ``twitter_token`` and ``twitter_secret`` have been replaced with
``app_key`` and ``app_secret`` respectively
    - ``callback_url`` is now passed through
``Twython.get_authentication_tokens``

[ci skip]
[ci skip]
[ci skip]
client_args allow for users to manipulate the request without our init
being cluttered up with keyword args

[ci skip]
I should run local tests before I commit :/
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 80c4289 on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f74596c on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ea178df on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ae9b9e2 on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling b9b7199 on 3.0.0 into * on master*.

…tempting better coverage reports

Secure variables were exposed. Had to make new ones.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 53b930b on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9813a4c on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 478c139 on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 693b816 on 3.0.0 into * on master*.

We don't support Python 2.5 and after 2.6 parse_qsl is available in
urlparse

[ci skip]
…dded a test, fixed function name

update_profile_background_image has been in endpoints.py twice for a
bit, my bad.

Using update_profile_banner_image for the function name to update
profile banner image (that's what it was called previously)
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 7cab9d5 on 3.0.0 into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 756eb90 on 3.0.0 into * on master*.

…r people with non-web apps

Removed README.md, rST can highlight syntax too I found out! :)
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2af2fc0 on 3.0.0 into * on master*.

@ryanmcgrath
Copy link
Owner

This all looks good to me, I think. I took a look at all the changes - nice on the .rst highlighting! Tempted to hit the merge button myself but I think you deserve the honors, haha... go for it when you're ready.

@michaelhelmick
Copy link
Collaborator Author

I'm going to take another look over it tomorrow. Make sure everything that should be shipped will get shipped. Also, think we should get rid of the wiki?

Sent from my iPhone

On Jun 16, 2013, at 6:47 PM, Ryan McGrath notifications@github.com wrote:

This all looks good to me, I think. I took a look at all the changes - nice on the .rst highlighting! Tempted to hit the merge button myself but I think you deserve the honors, haha... go for it when you're ready.


Reply to this email directly or view it on GitHub.

Releasing June 18th!

[ci skip]
michaelhelmick pushed a commit that referenced this pull request Jun 17, 2013
@michaelhelmick michaelhelmick merged commit f76f598 into master Jun 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants