X Tutup
Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bear/python-twitter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: bear/python-twitter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/collections
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 9 files changed
  • 1 contributor

Commits on Jan 22, 2017

  1. Prioritize kwargs over data when creating Status

    Because the construction of a Status model prioritized
    data in the `data` arg passed to NewFromJsonDict(),
    the kwargs are being overwritten, which seems a little
    backwards since if you specifically pass a kwarg,
    I'd think that should get priority.  This doesn't change
    any of behavior of the tests **except the following**:
    
    If a tweet had a `media` node in `data['entities']`,
    that was getting overwritten by the
    `data['extended_entities']['media']` node. This behavior
    was not documented anywhere and seems like a bug in a
    few cases (i.e., when there's a photo preview and
    also a video - the photo gets overwritten).
    jeremylow committed Jan 22, 2017
    Configuration menu
    Copy the full SHA
    4e11dbe View commit details
    Browse the repository at this point in the history
  2. add support for Collections

    Purpose
    -------
    Adds three methods for interacting with Collections on Twitter:
    
    1. Api.GetCollectionEntries
       (https://dev.twitter.com/rest/reference/get/collections/entries) will
    return a Collection populated with Status objects found in that
    Collection. This Collection object will have a not-None `statuses`
    attribute. This Collection will also have a `timeline` attribute for
    organizing tweets.
    
    2. Api.GetCollection
       (https://dev.twitter.com/rest/reference/get/collections/show) will
    return a Collection with some information about that collection such as
    name, id, user, etc.
    
    3. Api.GetCollectionList
       (https://dev.twitter.com/rest/reference/get/collections/list) will
    return a list of Collections (along with previous and next cursors)
    either for a given: user_id, screen_name, or containing a particular
    status.
    
    Additionally, a Collection model has been added. Because the endpoints
    above return a couple different flavors of Collections (with and without
    statuses/timelines/etc.), users should be aware that attributes may or
    may not exist. As with all models, there is a `_json` attribute if it is
    required.
    
    Testing
    -------
    Full coverage on all new methods. Test data has been added in
    testdata/collections. Tests are located in tests/test_collections.py
    jeremylow committed Jan 22, 2017
    Configuration menu
    Copy the full SHA
    f84df25 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2017

  1. add min/max position to Collection object

    min_position and max_position are available
    to page through a Collection of tweets, but
    only for the fully-hydrated Collection
    (ie. from GetCollectionEntries).
    
    adds inline documentation as well.
    jeremylow committed Jan 23, 2017
    Configuration menu
    Copy the full SHA
    7cc0200 View commit details
    Browse the repository at this point in the history
Loading
X Tutup