From 2b6ffeceed360c20c0bef2cfde03127ef694dd01 Mon Sep 17 00:00:00 2001 From: pinkrabbit412 Date: Fri, 15 Nov 2019 19:35:28 +0900 Subject: [PATCH] ReadTheDocs locale test. Only install.rst has been translated at this commit. --- docs/conf.py | 4 +- docs/en-US/.gitignore | 1 - docs/en-US/Makefile | 99 -- docs/en-US/api.rst | 1205 -------------- docs/en-US/auth_tutorial.rst | 148 -- docs/en-US/code_snippet.rst | 79 - docs/en-US/conf.py | 200 --- docs/en-US/cursor_tutorial.rst | 94 -- docs/en-US/extended_tweets.rst | 125 -- docs/en-US/getting_started.rst | 64 - docs/en-US/index.rst | 27 - docs/en-US/install.rst | 13 - docs/en-US/make.bat | 116 -- docs/en-US/parameters.rst | 27 - docs/en-US/running_tests.rst | 29 - docs/en-US/streaming_how_to.rst | 124 -- docs/ko-KR/.gitignore | 1 - docs/ko-KR/Makefile | 99 -- docs/ko-KR/api.rst | 1142 ------------- docs/ko-KR/auth_tutorial.rst | 124 -- docs/ko-KR/code_snippet.rst | 75 - docs/ko-KR/conf.py | 200 --- docs/ko-KR/cursor_tutorial.rst | 86 - docs/ko-KR/extended_tweets.rst | 127 -- docs/ko-KR/getting_started.rst | 62 - docs/ko-KR/index.rst | 27 - docs/ko-KR/install.rst | 13 - docs/ko-KR/make.bat | 113 -- docs/ko-KR/parameters.rst | 27 - docs/ko-KR/running_tests.rst | 24 - docs/ko-KR/streaming_how_to.rst | 88 - docs/locales/ko_KR/LC_MESSAGES/api.po | 1454 +++++++++++++++++ .../ko_KR/LC_MESSAGES/auth_tutorial.po | 177 ++ .../locales/ko_KR/LC_MESSAGES/code_snippet.po | 66 + .../ko_KR/LC_MESSAGES/cursor_tutorial.po | 108 ++ .../ko_KR/LC_MESSAGES/extended_tweets.po | 187 +++ .../ko_KR/LC_MESSAGES/getting_started.po | 78 + docs/locales/ko_KR/LC_MESSAGES/index.po | 39 + docs/locales/ko_KR/LC_MESSAGES/install.po | 31 + docs/locales/ko_KR/LC_MESSAGES/parameters.po | 19 + .../ko_KR/LC_MESSAGES/running_tests.po | 61 + .../ko_KR/LC_MESSAGES/streaming_how_to.po | 186 +++ 42 files changed, 2408 insertions(+), 4561 deletions(-) delete mode 100644 docs/en-US/.gitignore delete mode 100644 docs/en-US/Makefile delete mode 100644 docs/en-US/api.rst delete mode 100644 docs/en-US/auth_tutorial.rst delete mode 100644 docs/en-US/code_snippet.rst delete mode 100644 docs/en-US/conf.py delete mode 100644 docs/en-US/cursor_tutorial.rst delete mode 100644 docs/en-US/extended_tweets.rst delete mode 100644 docs/en-US/getting_started.rst delete mode 100644 docs/en-US/index.rst delete mode 100644 docs/en-US/install.rst delete mode 100644 docs/en-US/make.bat delete mode 100644 docs/en-US/parameters.rst delete mode 100644 docs/en-US/running_tests.rst delete mode 100644 docs/en-US/streaming_how_to.rst delete mode 100644 docs/ko-KR/.gitignore delete mode 100644 docs/ko-KR/Makefile delete mode 100644 docs/ko-KR/api.rst delete mode 100644 docs/ko-KR/auth_tutorial.rst delete mode 100644 docs/ko-KR/code_snippet.rst delete mode 100644 docs/ko-KR/conf.py delete mode 100644 docs/ko-KR/cursor_tutorial.rst delete mode 100644 docs/ko-KR/extended_tweets.rst delete mode 100644 docs/ko-KR/getting_started.rst delete mode 100644 docs/ko-KR/index.rst delete mode 100644 docs/ko-KR/install.rst delete mode 100644 docs/ko-KR/make.bat delete mode 100644 docs/ko-KR/parameters.rst delete mode 100644 docs/ko-KR/running_tests.rst delete mode 100644 docs/ko-KR/streaming_how_to.rst create mode 100644 docs/locales/ko_KR/LC_MESSAGES/api.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/auth_tutorial.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/code_snippet.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/cursor_tutorial.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/extended_tweets.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/getting_started.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/index.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/install.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/parameters.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/running_tests.po create mode 100644 docs/locales/ko_KR/LC_MESSAGES/streaming_how_to.po diff --git a/docs/conf.py b/docs/conf.py index 4a88a47..8781346 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,8 +56,8 @@ release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -locale_dirs = ['locale/'] -language = None +#locale_dirs = ['locale/'] +#language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/docs/en-US/.gitignore b/docs/en-US/.gitignore deleted file mode 100644 index e35d885..0000000 --- a/docs/en-US/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_build diff --git a/docs/en-US/Makefile b/docs/en-US/Makefile deleted file mode 100644 index 5d97e1a..0000000 --- a/docs/en-US/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - mkdir -p $(BUILDDIR)/html - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - mkdir -p $(BUILDDIR)/dirhtml - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -pickle: - mkdir -p $(BUILDDIR)/pickle - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - mkdir -p $(BUILDDIR)/json - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - mkdir -p $(BUILDDIR)/htmlhelp - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - mkdir -p $(BUILDDIR)/qthelp - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/tweepy.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/tweepy.qhc" - -latex: - mkdir -p $(BUILDDIR)/latex - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p $(BUILDDIR)/changes - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - mkdir -p $(BUILDDIR)/linkcheck - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - mkdir -p $(BUILDDIR)/doctest - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/en-US/api.rst b/docs/en-US/api.rst deleted file mode 100644 index 6c9e9c0..0000000 --- a/docs/en-US/api.rst +++ /dev/null @@ -1,1205 +0,0 @@ -.. _api_reference: - -.. include:: parameters.rst - -API Reference -============= - -This page contains some basic documentation for the Tweepy module. - - -:mod:`tweepy.api` --- Twitter API wrapper -========================================= - -.. class:: API([auth_handler=None], [host='api.twitter.com'], \ - [search_host='search.twitter.com'], [cache=None], \ - [api_root='/1'], [search_root=''], [retry_count=0], \ - [retry_delay=0], [retry_errors=None], [timeout=60], \ - [parser=ModelParser], [compression=False], \ - [wait_on_rate_limit=False], [wait_on_rate_limit_notify=False], \ - [proxy=None]) - - This class provides a wrapper for the API as provided by Twitter. - The functions provided in this class are listed below. - - :param auth_handler: authentication handler to be used - :param host: general API host - :param search_host: search API host - :param cache: cache backend to use - :param api_root: general API path root - :param search_root: search API path root - :param retry_count: default number of retries to attempt when error occurs - :param retry_delay: number of seconds to wait between retries - :param retry_errors: which HTTP status codes to retry - :param timeout: The maximum amount of time to wait for a response from - Twitter - :param parser: The object to use for parsing the response from Twitter - :param compression: Whether or not to use GZIP compression for requests - :param wait_on_rate_limit: Whether or not to automatically wait for rate - limits to replenish - :param wait_on_rate_limit_notify: Whether or not to print a notification - when Tweepy is waiting for rate limits to - replenish - :param proxy: The full url to an HTTPS proxy to use for connecting to - Twitter. - - -Timeline methods ----------------- - -.. method:: API.home_timeline([since_id], [max_id], [count], [page]) - - Returns the 20 most recent statuses, including retweets, posted by the - authenticating user and that user's friends. This is the equivalent of - /timeline/home on the Web. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.statuses_lookup(id_, [include_entities], [trim_user], [map_], \ - [include_ext_alt_text], [include_card_uri]) - - Returns full Tweet objects for up to 100 tweets per request, specified by - the ``id_`` parameter. - - :param id\_: A list of Tweet IDs to lookup, up to 100 - :param include_entities: |include_entities| - :param trim_user: |trim_user| - :param map\_: A boolean indicating whether or not to include tweets that - cannot be shown. Defaults to False. - :param include_ext_alt_text: |include_ext_alt_text| - :param include_card_uri: |include_card_uri| - :rtype: list of :class:`Status` objects - - -.. method:: API.user_timeline([id/user_id/screen_name], [since_id], [max_id], \ - [count], [page]) - - Returns the 20 most recent statuses posted from the authenticating user or - the user specified. It's also possible to request another user's timeline - via the id parameter. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.retweets_of_me([since_id], [max_id], [count], [page]) - - Returns the 20 most recent tweets of the authenticated user that have been - retweeted by others. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.mentions_timeline([since_id], [max_id], [count]) - - Returns the 20 most recent mentions, including retweets. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :rtype: list of :class:`Status` objects - - -Status methods --------------- - -.. method:: API.get_status(id, [trim_user], [include_my_retweet], \ - [include_entities], [include_ext_alt_text], \ - [include_card_uri]) - - Returns a single status specified by the ID parameter. - - :param id: |sid| - :param trim_user: |trim_user| - :param include_my_retweet: A boolean indicating if any Tweets returned that - have been retweeted by the authenticating user should include an - additional current_user_retweet node, containing the ID of the source - status for the retweet. - :param include_entities: |include_entities| - :param include_ext_alt_text: |include_ext_alt_text| - :param include_card_uri: |include_card_uri| - :rtype: :class:`Status` object - - -.. method:: API.update_status(status, [in_reply_to_status_id], \ - [auto_populate_reply_metadata], \ - [exclude_reply_user_ids], [attachment_url], \ - [media_ids], [possibly_sensitive], [lat], \ - [long], [place_id], [display_coordinates], \ - [trim_user], [enable_dmcommands], \ - [fail_dmcommands], [card_uri]) - - Updates the authenticating user's current status, also known as Tweeting. - - For each update attempt, the update text is compared with the authenticating - user's recent Tweets. Any attempt that would result in duplication will be - blocked, resulting in a 403 error. A user cannot submit the same status - twice in a row. - - While not rate limited by the API, a user is limited in the number of Tweets - they can create at a time. If the number of updates posted by the user - reaches the current allowed limit this method will return an HTTP 403 error. - - :param status: The text of your status update. - :param in_reply_to_status_id: The ID of an existing status that the update - is in reply to. Note: This parameter will be ignored unless the author of - the Tweet this parameter references is mentioned within the status text. - Therefore, you must include @username, where username is the author of - the referenced Tweet, within the update. - :param auto_populate_reply_metadata: If set to true and used with - in_reply_to_status_id, leading @mentions will be looked up from the - original Tweet, and added to the new Tweet from there. This wil append - @mentions into the metadata of an extended Tweet as a reply chain grows, - until the limit on @mentions is reached. In cases where the original - Tweet has been deleted, the reply will fail. - :param exclude_reply_user_ids: When used with auto_populate_reply_metadata, - a comma-separated list of user ids which will be removed from the - server-generated @mentions prefix on an extended Tweet. Note that the - leading @mention cannot be removed as it would break the - in-reply-to-status-id semantics. Attempting to remove it will be - silently ignored. - :param attachment_url: In order for a URL to not be counted in the status - body of an extended Tweet, provide a URL as a Tweet attachment. This URL - must be a Tweet permalink, or Direct Message deep link. Arbitrary, - non-Twitter URLs must remain in the status text. URLs passed to the - attachment_url parameter not matching either a Tweet permalink or Direct - Message deep link will fail at Tweet creation and cause an exception. - :param media_ids: A list of media_ids to associate with the Tweet. - You may include up to 4 photos or 1 animated GIF or 1 video in a Tweet. - :param possibly_sensitive: If you upload Tweet media that might be - considered sensitive content such as nudity, or medical procedures, you - must set this value to true. - :param lat: The latitude of the location this Tweet refers to. This - parameter will be ignored unless it is inside the range -90.0 to +90.0 - (North is positive) inclusive. It will also be ignored if there is no - corresponding long parameter. - :param long: The longitude of the location this Tweet refers to. The valid - ranges for longitude are -180.0 to +180.0 (East is positive) inclusive. - This parameter will be ignored if outside that range, if it is not a - number, if geo_enabled is disabled, or if there no corresponding lat - parameter. - :param place_id: A place in the world. - :param display_coordinates: Whether or not to put a pin on the exact - coordinates a Tweet has been sent from. - :param trim_user: |trim_user| - :param enable_dmcommands: When set to true, enables shortcode commands for - sending Direct Messages as part of the status text to send a Direct - Message to a user. When set to false, disables this behavior and includes - any leading characters in the status text that is posted - :param fail_dmcommands: When set to true, causes any status text that starts - with shortcode commands to return an API error. When set to false, allows - shortcode commands to be sent in the status text and acted on by the API. - :param card_uri: Associate an ads card with the Tweet using the card_uri - value from any ads card response. - :rtype: :class:`Status` object - - -.. method:: API.update_with_media(filename, [status], \ - [in_reply_to_status_id], \ - [auto_populate_reply_metadata], [lat], \ - [long], [source], [place_id], [file]) - - *Deprecated*: Use :func:`API.media_upload` instead. Update the authenticated - user's status. Statuses that are duplicates or too long will be silently - ignored. - - :param filename: The filename of the image to upload. This will - automatically be opened unless `file` is specified - :param status: The text of your status update. - :param in_reply_to_status_id: The ID of an existing status that the update - is in reply to. - :param auto_populate_reply_metadata: Whether to automatically include the - @mentions in the status metadata. - :param lat: The location's latitude that this tweet refers to. - :param long: The location's longitude that this tweet refers to. - :param source: Source of the update. Only supported by Identi.ca. Twitter - ignores this parameter. - :param place_id: Twitter ID of location which is listed in the Tweet if - geolocation is enabled for the user. - :param file: A file object, which will be used instead of opening - `filename`. `filename` is still required, for MIME type - detection and to use as a form field in the POST data - :rtype: :class:`Status` object - - -.. method:: API.destroy_status(id) - - Destroy the status specified by the id parameter. The authenticated user - must be the author of the status to destroy. - - :param id: |sid| - :rtype: :class:`Status` object - - -.. method:: API.retweet(id) - - Retweets a tweet. Requires the id of the tweet you are retweeting. - - :param id: |sid| - :rtype: :class:`Status` object - - -.. method:: API.retweeters(id, [cursor], [stringify_ids]) - - Returns up to 100 user IDs belonging to users who have retweeted the Tweet - specified by the id parameter. - - :param id: |sid| - :param cursor: |cursor| - :param stringify_ids: Have ids returned as strings instead. - :rtype: list of Integers - - -.. method:: API.retweets(id, [count]) - - Returns up to 100 of the first retweets of the given tweet. - - :param id: |sid| - :param count: Specifies the number of retweets to retrieve. - :rtype: list of :class:`Status` objects - - -.. method:: API.unretweet(id) - - Untweets a retweeted status. Requires the id of the retweet to unretweet. - - :param id: |sid| - :rtype: :class:`Status` object - - -User methods ------------- - -.. method:: API.get_user(id/user_id/screen_name) - - Returns information about the specified user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :rtype: :class:`User` object - - -.. method:: API.me() - - Returns the authenticated user's information. - - :rtype: :class:`User` object - - -.. method:: API.friends([id/user_id/screen_name], [cursor], [skip_status], \ - [include_user_entities]) - - Returns an user's friends ordered in which they were added 100 at a time. - If no user is specified it defaults to the authenticated user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param cursor: |cursor| - :param count: |count| - :param skip_status: |skip_status| - :param include_user_entities: |include_user_entities| - :rtype: list of :class:`User` objects - - -.. method:: API.followers([id/screen_name/user_id], [cursor]) - - Returns a user's followers ordered in which they were added. If no user is - specified by id/screen name, it defaults to the authenticated user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param cursor: |cursor| - :param count: |count| - :param skip_status: |skip_status| - :param include_user_entities: |include_user_entities| - :rtype: list of :class:`User` objects - - -.. method:: API.lookup_users([user_ids], [screen_names], [include_entities], \ - [tweet_mode]) - - Returns fully-hydrated user objects for up to 100 users per request. - - There are a few things to note when using this method. - - * You must be following a protected user to be able to see their most recent - status update. If you don't follow a protected user their status will be - removed. - * The order of user IDs or screen names may not match the order of users in - the returned array. - * If a requested user is unknown, suspended, or deleted, then that user will - not be returned in the results list. - * If none of your lookup criteria can be satisfied by returning a user - object, a HTTP 404 will be thrown. - - :param user_ids: A list of user IDs, up to 100 are allowed in a single - request. - :param screen_names: A list of screen names, up to 100 are allowed in a - single request. - :param include_entities: |include_entities| - :param tweet_mode: Valid request values are compat and extended, which give - compatibility mode and extended mode, respectively for - Tweets that contain over 140 characters. - :rtype: list of :class:`User` objects - - -.. method:: API.search_users(q, [count], [page]) - - Run a search for users similar to Find People button on Twitter.com; the - same results returned by people search on Twitter.com will be returned by - using this API (about being listed in the People Search). It is only - possible to retrieve the first 1000 matches from this API. - - :param q: The query to run against people search. - :param count: Specifies the number of statuses to retrieve. - May not be greater than 20. - :param page: |page| - :rtype: list of :class:`User` objects - - -Direct Message Methods ----------------------- - -.. method:: API.get_direct_message([id], [full_text]) - - Returns a specific direct message. - - :param id: |id| - :param full_text: |full_text| - :rtype: :class:`DirectMessage` object - - -.. method:: API.list_direct_messages([count], [cursor]) - - Returns all Direct Message events (both sent and received) within the last - 30 days. Sorted in reverse-chronological order. - - :param count: |count| - :param cursor: |cursor| - :rtype: list of :class:`DirectMessage` objects - - -.. method:: API.send_direct_message(recipient_id, text, [quick_reply_type], \ - [attachment_type], [attachment_media_id]) - - Sends a new direct message to the specified user from the authenticating - user. - - :param recipient_id: The ID of the user who should receive the direct - message. - :param text: The text of your Direct Message. Max length of 10,000 - characters. - :param quick_reply_type: The Quick Reply type to present to the user: - - * options - Array of Options objects (20 max). - * text_input - Text Input object. - * location - Location object. - :param attachment_type: The attachment type. Can be media or location. - :param attachment_media_id: A media id to associate with the message. - A Direct Message may only reference a single - media_id. - :rtype: :class:`DirectMessage` object - - -.. method:: API.destroy_direct_message(id) - - Deletes the direct message specified in the required ID parameter. The - authenticating user must be the recipient of the specified direct message. - Direct Messages are only removed from the interface of the user context - provided. Other members of the conversation can still access the Direct - Messages. - - :param id: The id of the Direct Message that should be deleted. - :rtype: None - - -Friendship Methods ------------------- - -.. method:: API.create_friendship(id/screen_name/user_id, [follow]) - - Create a new friendship with the specified user (aka follow). - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param follow: Enable notifications for the target user in addition to - becoming friends. - :rtype: :class:`User` object - - -.. method:: API.destroy_friendship(id/screen_name/user_id) - - Destroy a friendship with the specified user (aka unfollow). - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` object - - -.. method:: API.show_friendship(source_id/source_screen_name, \ - target_id/target_screen_name) - - Returns detailed information about the relationship between two users. - - :param source_id: The user_id of the subject user. - :param source_screen_name: The screen_name of the subject user. - :param target_id: The user_id of the target user. - :param target_screen_name: The screen_name of the target user. - :rtype: :class:`Friendship` object - - -.. method:: API.friends_ids(id/screen_name/user_id, [cursor]) - - Returns an array containing the IDs of users being followed by the specified - user. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :rtype: list of Integers - - -.. method:: API.followers_ids(id/screen_name/user_id) - - Returns an array containing the IDs of users following the specified user. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :rtype: list of Integers - - -Account Methods ---------------- - -.. method:: API.verify_credentials([include_entities], [skip_status], \ - [include_email]) - - Verify the supplied user credentials are valid. - - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :param include_email: When set to true email will be returned in the user - objects as a string. - :rtype: :class:`User` object if credentials are valid, otherwise False - - -.. method:: API.rate_limit_status() - - Returns the current rate limits for methods belonging to the specified - resource families. When using application-only auth, this method's response - indicates the application-only auth rate limiting context. - - :param resources: A comma-separated list of resource families you want to - know the current rate limit disposition for. - :rtype: :class:`JSON` object - - -.. method:: API.update_profile_image(filename) - - Update the authenticating user's profile image. Valid formats: GIF, JPG, or - PNG - - :param filename: local path to image file to upload. Not a remote URL! - :rtype: :class:`User` object - - -.. method:: API.update_profile_background_image(filename) - - Update authenticating user's background image. Valid formats: GIF, JPG, or - PNG - - :param filename: local path to image file to upload. Not a remote URL! - :rtype: :class:`User` object - - -.. method:: API.update_profile([name], [url], [location], [description]) - - Sets values that users are able to set under the "Account" tab of their - settings page. - - :param name: Maximum of 20 characters - :param url: Maximum of 100 characters. - Will be prepended with "http://" if not present - :param location: Maximum of 30 characters - :param description: Maximum of 160 characters - :rtype: :class:`User` object - - -Favorite Methods ----------------- - -.. method:: API.favorites([id], [page]) - - Returns the favorite statuses for the authenticating user or user specified - by the ID parameter. - - :param id: The ID or screen name of the user to request favorites - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.create_favorite(id) - - Favorites the status specified in the ID parameter as the authenticating - user. - - :param id: |sid| - :rtype: :class:`Status` object - - -.. method:: API.destroy_favorite(id) - - Un-favorites the status specified in the ID parameter as the authenticating - user. - - :param id: |sid| - :rtype: :class:`Status` object - - -Block Methods -------------- - -.. method:: API.create_block(id/screen_name/user_id) - - Blocks the user specified in the ID parameter as the authenticating user. - Destroys a friendship to the blocked user if it exists. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` object - - -.. method:: API.destroy_block(id/screen_name/user_id) - - Un-blocks the user specified in the ID parameter for the authenticating - user. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` object - - -.. method:: API.blocks([page]) - - Returns an array of user objects that the authenticating user is blocking. - - :param page: |page| - :rtype: list of :class:`User` objects - - -.. method:: API.blocks_ids([cursor]) - - Returns an array of numeric user ids the authenticating user is blocking. - - :param cursor: |cursor| - :rtype: list of Integers - - -Mute Methods ------------- - -.. method:: API.create_mute(id/screen_name/user_id) - - Mutes the user specified in the ID parameter for the authenticating user. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` object - - -.. method:: API.destroy_mute(id/screen_name/user_id) - - Un-mutes the user specified in the ID parameter for the authenticating user. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` object - - -.. method:: API.mutes([cursor], [include_entities], [skip_status]) - - Returns an array of user objects the authenticating user has muted. - - :param cursor: |cursor| - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :rtype: list of :class:`User` objects - - -.. method:: API.mutes_ids([cursor]) - - Returns an array of numeric user ids the authenticating user has muted. - - :param cursor: |cursor| - :rtype: list of Integers - - -Spam Reporting Methods ----------------------- - -.. method:: API.report_spam(id/screen_name/user_id, [perform_block]) - - The user specified in the id is blocked by the authenticated user and - reported as a spammer. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param perform_block: A boolean indicating if the reported account should be - blocked. Defaults to True. - :rtype: :class:`User` object - - -Saved Searches Methods ----------------------- - -.. method:: API.saved_searches() - - Returns the authenticated user's saved search queries. - - :rtype: list of :class:`SavedSearch` objects - - -.. method:: API.get_saved_search(id) - - Retrieve the data for a saved search owned by the authenticating user - specified by the given id. - - :param id: The id of the saved search to be retrieved. - :rtype: :class:`SavedSearch` object - - -.. method:: API.create_saved_search(query) - - Creates a saved search for the authenticated user. - - :param query: The query of the search the user would like to save. - :rtype: :class:`SavedSearch` object - - -.. method:: API.destroy_saved_search(id) - - Destroys a saved search for the authenticated user. The search specified by - id must be owned by the authenticating user. - - :param id: The id of the saved search to be deleted. - :rtype: :class:`SavedSearch` object - - -Help Methods ------------- - -.. method:: API.search(q, [geocode], [lang], [locale], [result_type], \ - [count], [until], [since_id], [max_id], \ - [include_entities]) - - Returns a collection of relevant Tweets matching a specified query. - - Please note that Twitter's search service and, by extension, the Search API - is not meant to be an exhaustive source of Tweets. Not all Tweets will be - indexed or made available via the search interface. - - In API v1.1, the response format of the Search API has been improved to - return Tweet objects more similar to the objects you’ll find across the REST - API and platform. However, perspectival attributes (fields that pertain to - the perspective of the authenticating user) are not currently supported on - this endpoint.\ [#]_\ [#]_ - - :param q: the search query string of 500 characters maximum, including - operators. Queries may additionally be limited by complexity. - :param geocode: Returns tweets by users located within a given radius of the - given latitude/longitude. The location is preferentially taking from the - Geotagging API, but will fall back to their Twitter profile. The - parameter value is specified by "latitide,longitude,radius", where radius - units must be specified as either "mi" (miles) or "km" (kilometers). Note - that you cannot use the near operator via the API to geocode arbitrary - locations; however you can use this geocode parameter to search near - geocodes directly. A maximum of 1,000 distinct "sub-regions" will be - considered when using the radius modifier. - :param lang: Restricts tweets to the given language, given by an ISO 639-1 - code. Language detection is best-effort. - :param locale: Specify the language of the query you are sending (only ja is - currently effective). This is intended for language-specific consumers - and the default should work in the majority of cases. - :param result_type: Specifies what type of search results you would prefer - to receive. The current default is "mixed." Valid values include: - - * mixed : include both popular and real time results in the response - * recent : return only the most recent results in the response - * popular : return only the most popular results in the response - :param count: |count| - :param until: Returns tweets created before the given date. Date should be - formatted as YYYY-MM-DD. Keep in mind that the search index has a 7-day - limit. In other words, no tweets will be found for a date older than one - week. - :param since_id: |since_id| There are limits to the number of Tweets which - can be accessed through the API. If the limit of Tweets has occurred - since the since_id, the since_id will be forced to the oldest ID - available. - :param max_id: |max_id| - :param include_entities: |include_entities| - :rtype: :class:`SearchResults` object - - -List Methods ------------- - -.. method:: API.create_list(name, [mode], [description]) - - Creates a new list for the authenticated user. - Note that you can create up to 1000 lists per account. - - :param name: The name of the new list. - :param mode: |list_mode| - :param description: The description of the list you are creating. - :rtype: :class:`List` object - - -.. method:: API.destroy_list([owner_screen_name/owner_id], list_id/slug) - - Deletes the specified list. - The authenticated user must own the list to be able to destroy it. - - :param owner_screen_name: |owner_screen_name| - :param owner_id: |owner_id| - :param list_id: |list_id| - :param slug: |slug| - :rtype: :class:`List` object - - -.. method:: API.update_list(list_id/slug, [name], [mode], [description], \ - [owner_screen_name/owner_id]) - - Updates the specified list. - The authenticated user must own the list to be able to update it. - - :param list_id: |list_id| - :param slug: |slug| - :param name: The name for the list. - :param mode: |list_mode| - :param description: The description to give the list. - :param owner_screen_name: |owner_screen_name| - :param owner_id: |owner_id| - :rtype: :class:`List` object - - -.. method:: API.lists_all([screen_name], [user_id], [reverse]) - - Returns all lists the authenticating or specified user subscribes to, - including their own. The user is specified using the ``user_id`` or - ``screen_name`` parameters. If no user is given, the authenticating user is - used. - - A maximum of 100 results will be returned by this call. Subscribed lists are - returned first, followed by owned lists. This means that if a user - subscribes to 90 lists and owns 20 lists, this method returns 90 - subscriptions and 10 owned lists. The ``reverse`` method returns owned lists - first, so with ``reverse=true``, 20 owned lists and 80 subscriptions would - be returned. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param reverse: A boolean indicating if you would like owned lists to be - returned first. See description above for information on how - this parameter works. - :rtype: list of :class:`List` objects - - -.. method:: API.lists_memberships([screen_name], [user_id], \ - [filter_to_owned_lists], [cursor], [count]) - - Returns the lists the specified user has been added to. If ``user_id`` or - ``screen_name`` are not provided, the memberships for the authenticating - user are returned. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param filter_to_owned_lists: A boolean indicating whether to return just - lists the authenticating user owns, and the user represented by - ``user_id`` or ``screen_name`` is a member of. - :param cursor: |cursor| - :param count: |count| - :rtype: list of :class:`List` objects - - -.. method:: API.lists_subscriptions([screen_name], [user_id], [cursor], \ - [count]) - - Obtain a collection of the lists the specified user is subscribed to, 20 - lists per page by default. Does not include the user's own lists. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :param count: |count| - :rtype: list of :class:`List` objects - - -.. method:: API.list_timeline(list_id/slug, [owner_id/owner_screen_name], \ - [since_id], [max_id], [count], \ - [include_entities], [include_rts]) - - Returns a timeline of tweets authored by members of the specified list. - Retweets are included by default. Use the ``include_rts=false`` parameter to - omit retweets. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param include_entities: |include_entities| - :param include_rts: A boolean indicating whether the list timeline will - contain native retweets (if they exist) in addition to the standard - stream of tweets. The output format of retweeted tweets is identical to - the representation you see in home_timeline. - :rtype: list of :class:`Status` objects - - -.. method:: API.get_list(list_id/slug, [owner_id/owner_screen_name]) - - Returns the specified list. Private lists will only be shown if the - authenticated user owns the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.add_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Add a member to a list. The authenticated user must own the list to be able - to add members to it. Lists are limited to 5,000 members. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.add_list_members(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Add up to 100 members to a list. The authenticated user must own the list to - be able to add members to it. Lists are limited to 5,000 members. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: A comma separated list of screen names, up to 100 are - allowed in a single request - :param user_id: A comma separated list of user IDs, up to 100 are allowed in - a single request - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.remove_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Removes the specified member from the list. The authenticated user must be - the list's owner to remove members from the list. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.remove_list_members(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Remove up to 100 members from a list. The authenticated user must own the - list to be able to remove members from it. Lists are limited to 5,000 - members. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: A comma separated list of screen names, up to 100 are - allowed in a single request - :param user_id: A comma separated list of user IDs, up to 100 are allowed in - a single request - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.list_members(list_id/slug, [owner_id/owner_screen_name], \ - [cursor]) - - Returns the members of the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param cursor: |cursor| - :rtype: list of :class:`User` objects - - -.. method:: API.show_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Check if the specified user is a member of the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`User` object if user is a member of list - - -.. method:: API.subscribe_list(list_id/slug, [owner_id/owner_screen_name]) - - Subscribes the authenticated user to the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.unsubscribe_list(list_id/slug, [owner_id/owner_screen_name]) - - Unsubscribes the authenticated user from the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.list_subscribers(list_id/slug, [owner_id/owner_screen_name], \ - [cursor], [count], [include_entities], \ - [skip_status]) - - Returns the subscribers of the specified list. Private list subscribers will - only be shown if the authenticated user owns the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param cursor: |cursor| - :param count: |count| - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :rtype: list of :class:`User` objects - - -.. method:: API.show_list_subscriber(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - Check if the specified user is a subscriber of the specified list. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`User` object if user is subscribed to list - - -Trends Methods --------------- - -.. method:: API.trends_available() - - Returns the locations that Twitter has trending topic information for. - The response is an array of "locations" that encode the location's WOEID - (a Yahoo! Where On Earth ID) and some other human-readable information such - as a canonical name and country the location belongs in. - - :rtype: :class:`JSON` object - - -.. method:: API.trends_place(id, [exclude]) - - Returns the top 50 trending topics for a specific WOEID, - if trending information is available for it. - - The response is an array of “trend” objects that encode the name of the - trending topic, the query parameter that can be used to search for the topic - on Twitter Search, and the Twitter Search URL. - - This information is cached for 5 minutes. Requesting more frequently than - that will not return any more data, and will count against your rate limit - usage. - - The tweet_volume for the last 24 hours is also returned for many trends if - this is available. - - :param id: The Yahoo! Where On Earth ID of the location to return trending - information for. Global information is available by using 1 as - the WOEID. - :param exclude: Setting this equal to hashtags will remove all hashtags - from the trends list. - :rtype: :class:`JSON` object - - -.. method:: API.trends_closest(lat, long) - - Returns the locations that Twitter has trending topic information for, - closest to a specified location. - - The response is an array of “locations” that encode the location’s WOEID and - some other human-readable information such as a canonical name and country - the location belongs in. - - A WOEID is a Yahoo! Where On Earth ID. - - :param lat: If provided with a long parameter the available trend locations - will be sorted by distance, nearest to furthest, to the - co-ordinate pair. The valid ranges for longitude is -180.0 to - +180.0 (West is negative, East is positive) inclusive. - :param long: If provided with a lat parameter the available trend locations - will be sorted by distance, nearest to furthest, to the - co-ordinate pair. The valid ranges for longitude is -180.0 to - +180.0 (West is negative, East is positive) inclusive. - :rtype: :class:`JSON` object - - -Geo Methods ------------ - -.. method:: API.reverse_geocode([lat], [long], [accuracy], [granularity], \ - [max_results]) - - Given a latitude and longitude, looks for places (cities and neighbourhoods) - whose IDs can be specified in a call to :func:`update_status` to appear as - the name of the location. This call provides a detailed response about the - location in question; the :func:`nearby_places` function should be preferred - for getting a list of places nearby without great detail. - - :param lat: The location's latitude. - :param long: The location's longitude. - :param accuracy: Specify the "region" in which to search, such as a number - (then this is a radius in meters, but it can also take a - string that is suffixed with ft to specify feet). - If this is not passed in, then it is assumed to be 0m - :param granularity: Assumed to be `neighborhood' by default; can also be - `city'. - :param max_results: A hint as to the maximum number of results to return. - This is only a guideline, which may not be adhered to. - - -.. method:: API.geo_id(id) - - Given *id* of a place, provide more details about that place. - - :param id: Valid Twitter ID of a location. - - -Utility methods ---------------- - -.. method:: API.configuration() - - Returns the current configuration used by Twitter including twitter.com - slugs which are not usernames, maximum photo resolutions, and t.co - shortened URL length. It is recommended applications request this endpoint - when they are loaded, but no more than once a day. - - -Media methods -------------- - -.. method:: API.media_upload(filename, [file]) - - Use this endpoint to upload images to Twitter. - - :param filename: The filename of the image to upload. This will - automatically be opened unless ``file`` is specified. - :param file: A file object, which will be used instead of opening - ``filename``. ``filename`` is still required, for MIME type - detection and to use as a form field in the POST data. - :rtype: :class:`Media` object - - -.. method:: API.create_media_metadata(media_id, alt_text) - - This endpoint can be used to provide additional information about the - uploaded media_id. This feature is currently only supported for images and - GIFs. Call this endpoint to attach additional metadata such as image alt - text. - - :param media_id: The ID of the media to add alt text to. - :param alt_text: The alt text to add to the image. - - -:mod:`tweepy.error` --- Exceptions -================================== - -The exceptions are available in the ``tweepy`` module directly, which means -``tweepy.error`` itself does not need to be imported. For example, -``tweepy.error.TweepError`` is available as ``tweepy.TweepError``. - - -.. exception:: TweepError - - The main exception Tweepy uses. Is raised for a number of things. - - When a ``TweepError`` is raised due to an error Twitter responded with, - the error code (`as described in the API documentation - `_) can be - accessed at ``TweepError.response.text``. Note, however, that - ``TweepError``\ s also may be raised with other things as message - (for example plain error reason strings). - - -.. exception:: RateLimitError - - Is raised when an API method fails due to hitting Twitter's rate limit. - Makes for easy handling of the rate limit specifically. - - Inherits from :exc:`TweepError`, so ``except TweepError`` will catch a - ``RateLimitError`` too. - - -.. rubric:: Footnotes - -.. [#] https://web.archive.org/web/20170829051949/https://dev.twitter.com/rest/reference/get/search/tweets -.. [#] https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-is-already-favorited-by-the-user/11145 diff --git a/docs/en-US/auth_tutorial.rst b/docs/en-US/auth_tutorial.rst deleted file mode 100644 index 29cac52..0000000 --- a/docs/en-US/auth_tutorial.rst +++ /dev/null @@ -1,148 +0,0 @@ -.. _auth_tutorial: - - -*********************** -Authentication Tutorial -*********************** - -Introduction -============ - -Tweepy supports both OAuth 1a (application-user) and OAuth 2 -(application-only) authentication. Authentication is handled by the -tweepy.AuthHandler class. - -OAuth 1a Authentication -======================= - -Tweepy tries to make OAuth 1a as painless as possible for you. To begin -the process we need to register our client application with -Twitter. Create a new application and once you -are done you should have your consumer key and secret. Keep these -two handy, you'll need them. - -The next step is creating an OAuthHandler instance. Into this we pass -our consumer key and secret which was given to us in the previous -paragraph:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - -If you have a web application and are using a callback URL that needs -to be supplied dynamically you would pass it in like so:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret, - callback_url) - -If the callback URL will not be changing, it is best to just configure -it statically on twitter.com when setting up your application's -profile. - -Unlike basic auth, we must do the OAuth 1a "dance" before we can start -using the API. We must complete the following steps: - -#. Get a request token from twitter - -#. Redirect user to twitter.com to authorize our application - -#. If using a callback, twitter will redirect the user to - us. Otherwise the user must manually supply us with the verifier - code. - -#. Exchange the authorized request token for an access token. - -So let's fetch our request token to begin the dance:: - - try: - redirect_url = auth.get_authorization_url() - except tweepy.TweepError: - print('Error! Failed to get request token.') - -This call requests the token from twitter and returns to us the -authorization URL where the user must be redirect to authorize us. Now -if this is a desktop application we can just hang onto our -OAuthHandler instance until the user returns back. In a web -application we will be using a callback request. So we must store the -request token in the session since we will need it inside the callback -URL request. Here is a pseudo example of storing the request token in -a session:: - - session.set('request_token', auth.request_token['oauth_token']) - -So now we can redirect the user to the URL returned to us earlier from -the get_authorization_url() method. - -If this is a desktop application (or any application not using -callbacks) we must query the user for the "verifier code" that twitter -will supply them after they authorize us. Inside a web application -this verifier value will be supplied in the callback request from -twitter as a GET query parameter in the URL. - -.. code-block :: python - - # Example using callback (web app) - verifier = request.GET.get('oauth_verifier') - - # Example w/o callback (desktop) - verifier = raw_input('Verifier:') - -The final step is exchanging the request token for an access -token. The access token is the "key" for opening the Twitter API -treasure box. To fetch this token we do the following:: - - # Let's say this is a web app, so we need to re-build the auth handler - # first... - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - token = session.get('request_token') - session.delete('request_token') - auth.request_token = { 'oauth_token' : token, - 'oauth_token_secret' : verifier } - - try: - auth.get_access_token(verifier) - except tweepy.TweepError: - print('Error! Failed to get access token.') - -It is a good idea to save the access token for later use. You do not -need to re-fetch it each time. Twitter currently does not expire the -tokens, so the only time it would ever go invalid is if the user -revokes our application access. To store the access token depends on -your application. Basically you need to store 2 string values: key and -secret:: - - auth.access_token - auth.access_token_secret - -You can throw these into a database, file, or where ever you store -your data. To re-build an OAuthHandler from this stored access token -you would do this:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(key, secret) - -So now that we have our OAuthHandler equipped with an access token, we -are ready for business:: - - api = tweepy.API(auth) - api.update_status('tweepy + oauth!') - -OAuth 2 Authentication -====================== - -Tweepy also supports OAuth 2 authentication. OAuth 2 is a method of -authentication where an application makes API requests without the -user context. Use this method if you just need read-only access to -public information. - -Like OAuth 1a, we first register our client application and acquire -a consumer key and secret. - -Then we create an AppAuthHandler instance, passing in our consumer -key and secret:: - - auth = tweepy.AppAuthHandler(consumer_key, consumer_secret) - -With the bearer token received, we are now ready for business:: - - api = tweepy.API(auth) - for tweet in tweepy.Cursor(api.search, q='tweepy').items(10): - print(tweet.text) \ No newline at end of file diff --git a/docs/en-US/code_snippet.rst b/docs/en-US/code_snippet.rst deleted file mode 100644 index f838e2a..0000000 --- a/docs/en-US/code_snippet.rst +++ /dev/null @@ -1,79 +0,0 @@ -.. _code_snippet: - - -************* -Code Snippets -************* - -Introduction -============ - -Here are some code snippets to help you out with using Tweepy. Feel -free to contribute your own snippets or improve the ones here! - -OAuth -===== - -.. code-block :: python - - auth = tweepy.OAuthHandler("consumer_key", "consumer_secret") - - # Redirect user to Twitter to authorize - redirect_user(auth.get_authorization_url()) - - # Get access token - auth.get_access_token("verifier_value") - - # Construct the API instance - api = tweepy.API(auth) - -Pagination -========== - -.. code-block :: python - - # Iterate through all of the authenticated user's friends - for friend in tweepy.Cursor(api.friends).items(): - # Process the friend here - process_friend(friend) - - # Iterate through the first 200 statuses in the home timeline - for status in tweepy.Cursor(api.home_timeline).items(200): - # Process the status here - process_status(status) - -FollowAll -========= - -This snippet will follow every follower of the authenticated user. - -.. code-block :: python - - for follower in tweepy.Cursor(api.followers).items(): - follower.follow() - -Handling the rate limit using cursors -===================================== - -Since cursors raise ``RateLimitError``\ s in their ``next()`` method, -handling them can be done by wrapping the cursor in an iterator. - -Running this snippet will print all users you follow that themselves follow -less than 300 people total - to exclude obvious spambots, for example - and -will wait for 15 minutes each time it hits the rate limit. - -.. code-block :: python - - # In this example, the handler is time.sleep(15 * 60), - # but you can of course handle it in any way you want. - - def limit_handled(cursor): - while True: - try: - yield cursor.next() - except tweepy.RateLimitError: - time.sleep(15 * 60) - - for follower in limit_handled(tweepy.Cursor(api.followers).items()): - if follower.friends_count < 300: - print(follower.screen_name) diff --git a/docs/en-US/conf.py b/docs/en-US/conf.py deleted file mode 100644 index a09d427..0000000 --- a/docs/en-US/conf.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -# -# tweepy documentation build configuration file, created by -# sphinx-quickstart on Sun Dec 6 11:13:52 2009. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -import sys - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('.')) -sys.path.append(os.path.abspath('..')) - -# -- General configuration ----------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc'] - -# Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'tweepy' -copyright = u'2009-2019, Joshua Roesslein' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -sys.path.insert(0, '..') -from tweepy import __version__ - -version = __version__ -# The full version, including alpha/beta/rc tags. -release = __version__ - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -locale_dirs = ['locale/'] -language = 'en' - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of documents that shouldn't be included in the build. -#unused_docs = [] - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -html_use_modindex = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = '' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'tweepydoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'tweepy.tex', u'tweepy Documentation', - u'Joshua Roesslein', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_use_modindex = True diff --git a/docs/en-US/cursor_tutorial.rst b/docs/en-US/cursor_tutorial.rst deleted file mode 100644 index 9aef25e..0000000 --- a/docs/en-US/cursor_tutorial.rst +++ /dev/null @@ -1,94 +0,0 @@ -.. _cursor_tutorial: - -*************** -Cursor Tutorial -*************** - -This tutorial describes details on pagination with Cursor objects. - -Introduction -============ - -We use pagination a lot in Twitter API development. Iterating through -timelines, user lists, direct messages, etc. In order to perform -pagination, we must supply a page/cursor parameter with each of our -requests. The problem here is this requires a lot of boiler plate code -just to manage the pagination loop. To help make pagination easier and -require less code, Tweepy has the Cursor object. - -Old way vs Cursor way -===================== - -First let's demonstrate iterating the statuses in the authenticated -user's timeline. Here is how we would do it the "old way" before the -Cursor object was introduced:: - - page = 1 - while True: - statuses = api.user_timeline(page=page) - if statuses: - for status in statuses: - # process status here - process_status(status) - else: - # All done - break - page += 1 # next page - -As you can see, we must manage the "page" parameter manually in our -pagination loop. Now here is the version of the code using the Cursor -object:: - - for status in tweepy.Cursor(api.user_timeline).items(): - # process status here - process_status(status) - -Now that looks much better! Cursor handles all the pagination work for -us behind the scenes, so our code can now focus entirely on processing -the results. - -Passing parameters into the API method -====================================== - -What if you need to pass in parameters to the API method? - -.. code-block :: python - - api.user_timeline(id="twitter") - -Since we pass Cursor the callable, we can not pass the parameters -directly into the method. Instead we pass the parameters into the -Cursor constructor method:: - - tweepy.Cursor(api.user_timeline, id="twitter") - -Now Cursor will pass the parameter into the method for us whenever it -makes a request. - -Items or Pages -============== - -So far we have just demonstrated pagination iterating per -item. What if instead you want to process per page of results? You -would use the pages() method:: - - for page in tweepy.Cursor(api.user_timeline).pages(): - # page is a list of statuses - process_page(page) - - -Limits -====== - -What if you only want n items or pages returned? You pass into the -items() or pages() methods the limit you want to impose. - -.. code-block :: python - - # Only iterate through the first 200 statuses - for status in tweepy.Cursor(api.user_timeline).items(200): - process_status(status) - - # Only iterate through the first 3 pages - for page in tweepy.Cursor(api.user_timeline).pages(3): - process_page(page) diff --git a/docs/en-US/extended_tweets.rst b/docs/en-US/extended_tweets.rst deleted file mode 100644 index d47ef66..0000000 --- a/docs/en-US/extended_tweets.rst +++ /dev/null @@ -1,125 +0,0 @@ -.. _extended_tweets: -.. _Twitter's Tweet updates documentation: https://developer.twitter.com/en/docs/tweets/tweet-updates - -*************** -Extended Tweets -*************** - -This supplements `Twitter's Tweet updates documentation`_. - -Introduction -============ - -On May 24, 2016, Twitter -`announced `_ -changes to the way that replies and URLs are handled and -`published plans `_ -around support for these changes in the Twitter API and initial technical -documentation describing the updates to Tweet objects and API options.\ [#]_ -On September 26, 2017, Twitter -`started testing `_ -280 characters for certain languages,\ [#]_ and on November 7, 2017, -`announced `_ -that the character limit was being expanded for Tweets in languages where -cramming was an issue.\ [#]_ - -Standard API methods -==================== - -Any ``tweepy.API`` method that returns a Status object accepts a new -``tweet_mode`` parameter. Valid values for this parameter are ``compat`` and -``extended``, which give compatibility mode and extended mode, respectively. -The default mode (if no parameter is provided) is compatibility mode. - -Compatibility mode ------------------- - -By default, using compatibility mode, the ``text`` attribute of Status objects -returned by ``tweepy.API`` methods is truncated to 140 characters, as needed. -When this truncation occurs, the ``truncated`` attribute of the Status object -will be ``True``, and only entities that are fully contained within the -available 140 characters range will be included in the ``entities`` attribute. -It will also be discernible that the ``text`` attribute of the Status object -is truncated as it will be suffixed with an ellipsis character, a space, and a -shortened self-permalink URL to the Tweet. - -Extended mode -------------- - -When using extended mode, the ``text`` attribute of Status objects returned by -``tweepy.API`` methods is replaced by a ``full_text`` attribute, which -contains the entire untruncated text of the Tweet. The ``truncated`` attribute -of the Status object will be ``False``, and the ``entities`` attribute will -contain all entities. Additionally, the Status object will have a -``display_text_range`` attribute, an array of two Unicode code point indices, -identifying the inclusive start and exclusive end of the displayable content -of the Tweet. - -Streaming -========= - -By default, the Status objects from streams may contain an ``extended_tweet`` -attribute representing the equivalent field in the raw data/payload for the -Tweet. This attribute/field will only exist for extended Tweets, containing a -dictionary of sub-fields. The ``full_text`` sub-field/key of this dictionary -will contain the full, untruncated text of the Tweet, and the ``entities`` -sub-field/key will contain the full set of entities. If there are extended -entities, the ``extended_entities`` sub-field/key will contain the full set of -those. Additionally, the ``display_text_range`` sub-field/key will contain an -array of two Unicode code point indices, identifying the inclusive start and -exclusive end of the displayable content of the Tweet. - -Handling Retweets -================= - -When using extended mode with a Retweet, the ``full_text`` attribute of the -Status object may be truncated with an ellipsis character instead of -containing the full text of the Retweet. However, since the -``retweeted_status`` attribute (of a Status object that is a Retweet) is -itself a Status object, the ``full_text`` attribute of the Retweeted Status -object can be used instead. - -This also applies similarly to Status objects/payloads that are Retweets from -streams. The dictionary from the ``extended_tweet`` attribute/field contains a -``full_text`` sub-field/key that may be truncated with an ellipsis character. -Instead, the ``extended_tweet`` attribute/field of the Retweeted Status (from -the ``retweeted_status`` attribute/field) can be used. - -Examples -======== - -Given an existing ``tweepy.API`` object and ``id`` for a Tweet, the following -can be used to print the full text of the Tweet, or if it's a Retweet, the -full text of the Retweeted Tweet:: - - status = api.get_status(id, tweet_mode="extended") - try: - print(status.retweeted_status.full_text) - except AttributeError: # Not a Retweet - print(status.full_text) - -If ``status`` is a Retweet, ``status.full_text`` could be truncated. - -This Status event handler for a ``StreamListener`` prints the full text of the -Tweet, or if it's a Retweet, the full text of the Retweeted Tweet:: - - def on_status(self, status): - if hasattr(status, "retweeted_status"): # Check if Retweet - try: - print(status.retweeted_status.extended_tweet["full_text"]) - except AttributeError: - print(status.retweeted_status.text) - else: - try: - print(status.extended_tweet["full_text"]) - except AttributeError: - print(status.text) - -If ``status`` is a Retweet, it will not have an ``extended_tweet`` attribute, -and ``status.text`` could be truncated. - -.. rubric:: Footnotes - -.. [#] https://twittercommunity.com/t/upcoming-changes-to-simplify-replies-and-links-in-tweets/67497 -.. [#] https://twittercommunity.com/t/testing-280-characters-for-certain-languages/94126 -.. [#] https://twittercommunity.com/t/updating-the-character-limit-and-the-twitter-text-library/96425 diff --git a/docs/en-US/getting_started.rst b/docs/en-US/getting_started.rst deleted file mode 100644 index c084fde..0000000 --- a/docs/en-US/getting_started.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. _getting_started: - - -*************** -Getting started -*************** - -Introduction -============ - -If you are new to Tweepy, this is the place to begin. The goal of this -tutorial is to get you set-up and rolling with Tweepy. We won't go -into too much detail here, just some important basics. - -Hello Tweepy -============ - -.. code-block :: python - - import tweepy - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(access_token, access_token_secret) - - api = tweepy.API(auth) - - public_tweets = api.home_timeline() - for tweet in public_tweets: - print(tweet.text) - -This example will download your home timeline tweets and print each -one of their texts to the console. Twitter requires all requests to -use OAuth for authentication. -The :ref:`auth_tutorial` goes into more details about authentication. - -API -=== - -The API class provides access to the entire twitter RESTful API -methods. Each method can accept various parameters and return -responses. For more information about these methods please refer to -:ref:`API Reference `. - -Models -====== - -When we invoke an API method most of the time returned back to us will -be a Tweepy model class instance. This will contain the data returned -from Twitter which we can then use inside our application. For example -the following code returns to us an User model:: - - # Get the User object for twitter... - user = api.get_user('twitter') - -Models contain the data and some helper methods which we can then -use:: - - print(user.screen_name) - print(user.followers_count) - for friend in user.friends(): - print(friend.screen_name) - -For more information about models please see ModelsReference. - diff --git a/docs/en-US/index.rst b/docs/en-US/index.rst deleted file mode 100644 index 1daa4f9..0000000 --- a/docs/en-US/index.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. tweepy documentation master file, created by - sphinx-quickstart on Sun Dec 6 11:13:52 2009. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Tweepy Documentation -==================== - -Contents: - -.. toctree:: - :maxdepth: 2 - - getting_started.rst - auth_tutorial.rst - code_snippet.rst - cursor_tutorial.rst - extended_tweets.rst - streaming_how_to.rst - api.rst - running_tests.rst - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search` diff --git a/docs/en-US/install.rst b/docs/en-US/install.rst deleted file mode 100644 index 0d4857a..0000000 --- a/docs/en-US/install.rst +++ /dev/null @@ -1,13 +0,0 @@ -Installation -============ - -Install from PyPI:: - - easy_install tweepy - -Install from source:: - - git clone git://github.com/tweepy/tweepy.git - cd tweepy - python setup.py install - diff --git a/docs/en-US/make.bat b/docs/en-US/make.bat deleted file mode 100644 index 1a93dda..0000000 --- a/docs/en-US/make.bat +++ /dev/null @@ -1,116 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -set SPHINXBUILD=sphinx-build -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% -) - -pause - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\tweepy.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\tweepy.ghc - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end -pause diff --git a/docs/en-US/parameters.rst b/docs/en-US/parameters.rst deleted file mode 100644 index 28c04f2..0000000 --- a/docs/en-US/parameters.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. API parameters: - -.. |count| replace:: The number of results to try and retrieve per page. -.. |cursor| replace:: Breaks the results into pages. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list. -.. |date| replace:: Permits specifying a start date for the report. The date should be formatted YYYY-MM-DD. -.. |exclude| replace:: Setting this equal to hashtags will remove all hashtags from the trends list. -.. |full_text| replace:: A boolean indicating whether or not the full text of a message should be returned. If False the message text returned will be truncated to 140 chars. Defaults to False. -.. |include_card_uri| replace:: A boolean indicating if the retrieved Tweet should include a card_uri attribute when there is an ads card attached to the Tweet and when that card was attached using the card_uri value. -.. |include_entities| replace:: The entities node will not be included when set to false. Defaults to true. -.. |include_ext_alt_text| replace:: If alt text has been added to any attached media entities, this parameter will return an ext_alt_text value in the top-level key for the media entity. -.. |include_user_entities| replace:: The user object entities node will not be included when set to false. Defaults to true. -.. |list_id| replace:: The numerical id of the list. -.. |list_mode| replace:: Whether your list is public or private. Values can be public or private. Lists are public by default if no mode is specified. -.. |list_owner| replace:: the screen name of the owner of the list -.. |max_id| replace:: Returns only statuses with an ID less than (that is, older than) or equal to the specified ID. -.. |owner_id| replace:: The user ID of the user who owns the list being requested by a slug. -.. |owner_screen_name| replace:: The screen name of the user who owns the list being requested by a slug. -.. |page| replace:: Specifies the page of results to retrieve. Note: there are pagination limits. -.. |screen_name| replace:: Specifies the screen name of the user. Helpful for disambiguating when a valid screen name is also a user ID. -.. |sid| replace:: The numerical ID of the status. -.. |since_id| replace:: Returns only statuses with an ID greater than (that is, more recent than) the specified ID. -.. |skip_status| replace:: A boolean indicating whether statuses will not be included in the returned user objects. Defaults to false. -.. |slug| replace:: You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters. -.. |trim_user| replace:: A boolean indicating if user IDs should be provided, instead of complete user objects. Defaults to False. -.. |uid| replace:: Specifies the ID or screen name of the user. -.. |user_id| replace:: Specifies the ID of the user. Helpful for disambiguating when a valid user ID is also a valid screen name. - diff --git a/docs/en-US/running_tests.rst b/docs/en-US/running_tests.rst deleted file mode 100644 index 3131751..0000000 --- a/docs/en-US/running_tests.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. _running_tests: - -************* -Running Tests -************* - -These steps outline how to run tests for Tweepy: - -1. Download Tweepy's source code to a directory. - -2. Install from the downloaded source with the ``test`` extra, e.g. - ``pip install .[test]``. Optionally install the ``dev`` extra as well, for - ``tox`` and ``coverage``, e.g. ``pip install .[dev,test]``. - -3. Run ``python setup.py nosetests`` or simply ``nosetests`` in the source - directory. With the ``dev`` extra, coverage will be shown, and ``tox`` can - also be run to test different Python versions. - -To record new cassettes, the following environment variables can be used: - -``TWITTER_USERNAME`` -``CONSUMER_KEY`` -``CONSUMER_SECRET`` -``ACCESS_KEY`` -``ACCESS_SECRET`` -``USE_REPLAY`` - -Simply set ``USE_REPLAY`` to ``False`` and provide the app and account -credentials and username. diff --git a/docs/en-US/streaming_how_to.rst b/docs/en-US/streaming_how_to.rst deleted file mode 100644 index 81d1539..0000000 --- a/docs/en-US/streaming_how_to.rst +++ /dev/null @@ -1,124 +0,0 @@ -.. _streaming_how_to: -.. _Twitter Streaming API Documentation: https://developer.twitter.com/en/docs/tweets/filter-realtime/overview -.. _Twitter Streaming API Connecting Documentation: https://developer.twitter.com/en/docs/tutorials/consuming-streaming-data -.. _Twitter Response Codes Documentation: https://dev.twitter.com/overview/api/response-codes - -********************* -Streaming With Tweepy -********************* -Tweepy makes it easier to use the twitter streaming api by handling authentication, -connection, creating and destroying the session, reading incoming messages, -and partially routing messages. - -This page aims to help you get started using Twitter streams with Tweepy -by offering a first walk through. Some features of Tweepy streaming are -not covered here. See streaming.py in the Tweepy source code. - -API authorization is required to access Twitter streams. -Follow the :ref:`auth_tutorial` if you need help with authentication. - -Summary -======= -The Twitter streaming API is used to download twitter messages in real -time. It is useful for obtaining a high volume of tweets, or for -creating a live feed using a site stream or user stream. -See the `Twitter Streaming API Documentation`_. - -The streaming api is quite different from the REST api because the -REST api is used to *pull* data from twitter but the streaming api -*pushes* messages to a persistent session. This allows the streaming -api to download more data in real time than could be done using the -REST API. - -In Tweepy, an instance of **tweepy.Stream** establishes a streaming -session and routes messages to **StreamListener** instance. The -**on_data** method of a stream listener receives all messages and -calls functions according to the message type. The default -**StreamListener** can classify most common twitter messages and -routes them to appropriately named methods, but these methods are -only stubs. - -Therefore using the streaming api has three steps. - -1. Create a class inheriting from **StreamListener** - -2. Using that class create a **Stream** object - -3. Connect to the Twitter API using the **Stream**. - - -Step 1: Creating a **StreamListener** -===================================== -This simple stream listener prints status text. -The **on_data** method of Tweepy's **StreamListener** conveniently passes -data from statuses to the **on_status** method. -Create class **MyStreamListener** inheriting from **StreamListener** -and overriding **on_status**.:: - import tweepy - #override tweepy.StreamListener to add logic to on_status - class MyStreamListener(tweepy.StreamListener): - - def on_status(self, status): - print(status.text) - -Step 2: Creating a **Stream** -============================= -We need an api to stream. See :ref:`auth_tutorial` to learn how to get an api object. -Once we have an api and a status listener we can create our stream object.:: - - myStreamListener = MyStreamListener() - myStream = tweepy.Stream(auth = api.auth, listener=myStreamListener) - -Step 3: Starting a Stream -========================= -A number of twitter streams are available through Tweepy. Most cases -will use filter, the user_stream, or the sitestream. -For more information on the capabilities and limitations of the different -streams see `Twitter Streaming API Documentation`_. - -In this example we will use **filter** to stream all tweets containing -the word *python*. The **track** parameter is an array of search terms to stream. :: - - myStream.filter(track=['python']) - -This example shows how to use **filter** to stream tweets by a specific user. The **follow** parameter is an array of IDs. :: - - myStream.filter(follow=["2211149702"]) - -An easy way to find a single ID is to use one of the many conversion websites: search for 'what is my twitter ID'. - -A Few More Pointers -=================== - -Async Streaming ---------------- -Streams do not terminate unless the connection is closed, blocking the thread. -Tweepy offers a convenient **is_async** parameter on **filter** so the stream will run on a new -thread. For example :: - - myStream.filter(track=['python'], is_async=True) - -Handling Errors ---------------- -When using Twitter's streaming API one must be careful of the dangers of -rate limiting. If clients exceed a limited number of attempts to connect to the streaming API -in a window of time, they will receive error 420. The amount of time a client has to wait after receiving error 420 -will increase exponentially each time they make a failed attempt. - -Tweepy's **Stream Listener** passes error codes to an **on_error** stub. The -default implementation returns **False** for all codes, but we can override it -to allow Tweepy to reconnect for some or all codes, using the backoff -strategies recommended in the `Twitter Streaming API Connecting -Documentation`_. :: - - class MyStreamListener(tweepy.StreamListener): - - def on_error(self, status_code): - if status_code == 420: - #returning False in on_error disconnects the stream - return False - - # returning non-False reconnects the stream, with backoff. - -For more information on error codes from the Twitter API see `Twitter Response Codes Documentation`_. - diff --git a/docs/ko-KR/.gitignore b/docs/ko-KR/.gitignore deleted file mode 100644 index e35d885..0000000 --- a/docs/ko-KR/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_build diff --git a/docs/ko-KR/Makefile b/docs/ko-KR/Makefile deleted file mode 100644 index 5d97e1a..0000000 --- a/docs/ko-KR/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - mkdir -p $(BUILDDIR)/html - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - mkdir -p $(BUILDDIR)/dirhtml - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -pickle: - mkdir -p $(BUILDDIR)/pickle - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - mkdir -p $(BUILDDIR)/json - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - mkdir -p $(BUILDDIR)/htmlhelp - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - mkdir -p $(BUILDDIR)/qthelp - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/tweepy.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/tweepy.qhc" - -latex: - mkdir -p $(BUILDDIR)/latex - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p $(BUILDDIR)/changes - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - mkdir -p $(BUILDDIR)/linkcheck - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - mkdir -p $(BUILDDIR)/doctest - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/ko-KR/api.rst b/docs/ko-KR/api.rst deleted file mode 100644 index 79caea8..0000000 --- a/docs/ko-KR/api.rst +++ /dev/null @@ -1,1142 +0,0 @@ -.. _api_reference: - -.. include:: parameters.rst - -API Reference -============= - -This page contains some basic documentation for the Tweepy module. - - -:mod:`tweepy.api` --- Twitter API wrapper -========================================= - -.. class:: API([auth_handler=None], [host='api.twitter.com'], \ - [search_host='search.twitter.com'], [cache=None], \ - [api_root='/1'], [search_root=''], [retry_count=0], \ - [retry_delay=0], [retry_errors=None], [timeout=60], \ - [parser=ModelParser], [compression=False], \ - [wait_on_rate_limit=False], [wait_on_rate_limit_notify=False], \ - [proxy=None]) - - This class provides a wrapper for the API as provided by Twitter. - The functions provided in this class are listed below. - - :param auth_handler: authentication handler to be used - :param host: general API host - :param search_host: search API host - :param cache: cache backend to use - :param api_root: general API path root - :param search_root: search API path root - :param retry_count: default number of retries to attempt when error occurs - :param retry_delay: number of seconds to wait between retries - :param retry_errors: which HTTP status codes to retry - :param timeout: The maximum amount of time to wait for a response from - Twitter - :param parser: The object to use for parsing the response from Twitter - :param compression: Whether or not to use GZIP compression for requests - :param wait_on_rate_limit: Whether or not to automatically wait for rate - limits to replenish - :param wait_on_rate_limit_notify: Whether or not to print a notification - when Tweepy is waiting for rate limits to - replenish - :param proxy: The full url to an HTTPS proxy to use for connecting to - Twitter. - - -Timeline methods ----------------- - -.. method:: API.home_timeline([since_id], [max_id], [count], [page]) - - Returns the 20 most recent statuses, including retweets, posted by the - authenticating user and that user's friends. This is the equivalent of - /timeline/home on the Web. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.statuses_lookup(id_, [include_entities], [trim_user], [map_], \ - [include_ext_alt_text], [include_card_uri]) - - Returns full Tweet objects for up to 100 tweets per request, specified by - the ``id_`` parameter. - - :param id\_: A list of Tweet IDs to lookup, up to 100 - :param include_entities: |include_entities| - :param trim_user: |trim_user| - :param map\_: A boolean indicating whether or not to include tweets that - cannot be shown. Defaults to False. - :param include_ext_alt_text: |include_ext_alt_text| - :param include_card_uri: |include_card_uri| - :rtype: list of :class:`Status` objects - - -.. method:: API.user_timeline([id/user_id/screen_name], [since_id], [max_id], \ - [count], [page]) - - Returns the 20 most recent statuses posted from the authenticating user or - the user specified. It's also possible to request another user's timeline - via the id parameter. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.retweets_of_me([since_id], [max_id], [count], [page]) - - Returns the 20 most recent tweets of the authenticated user that have been - retweeted by others. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param page: |page| - :rtype: list of :class:`Status` objects - - -.. method:: API.mentions_timeline([since_id], [max_id], [count]) - - Returns the 20 most recent mentions, including retweets. - - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :rtype: list of :class:`Status` objects - - -Status methods --------------- - -.. method:: API.get_status(id, [trim_user], [include_my_retweet], \ - [include_entities], [include_ext_alt_text], \ - [include_card_uri]) - - Returns a single status specified by the ID parameter. - - :param id: |sid| - :param trim_user: |trim_user| - :param include_my_retweet: A boolean indicating if any Tweets returned that - have been retweeted by the authenticating user should include an - additional current_user_retweet node, containing the ID of the source - status for the retweet. - :param include_entities: |include_entities| - :param include_ext_alt_text: |include_ext_alt_text| - :param include_card_uri: |include_card_uri| - :rtype: :class:`Status` object - - -.. method:: API.update_status(status, [in_reply_to_status_id], \ - [auto_populate_reply_metadata], \ - [exclude_reply_user_ids], [attachment_url], \ - [media_ids], [possibly_sensitive], [lat], \ - [long], [place_id], [display_coordinates], \ - [trim_user], [enable_dmcommands], \ - [fail_dmcommands], [card_uri]) - - Updates the authenticating user's current status, also known as Tweeting. - - For each update attempt, the update text is compared with the authenticating - user's recent Tweets. Any attempt that would result in duplication will be - blocked, resulting in a 403 error. A user cannot submit the same status - twice in a row. - - While not rate limited by the API, a user is limited in the number of Tweets - they can create at a time. If the number of updates posted by the user - reaches the current allowed limit this method will return an HTTP 403 error. - - :param status: The text of your status update. - :param in_reply_to_status_id: The ID of an existing status that the update - is in reply to. Note: This parameter will be ignored unless the author of - the Tweet this parameter references is mentioned within the status text. - Therefore, you must include @username, where username is the author of - the referenced Tweet, within the update. - :param auto_populate_reply_metadata: If set to true and used with - in_reply_to_status_id, leading @mentions will be looked up from the - original Tweet, and added to the new Tweet from there. This wil append - @mentions into the metadata of an extended Tweet as a reply chain grows, - until the limit on @mentions is reached. In cases where the original - Tweet has been deleted, the reply will fail. - :param exclude_reply_user_ids: When used with auto_populate_reply_metadata, - a comma-separated list of user ids which will be removed from the - server-generated @mentions prefix on an extended Tweet. Note that the - leading @mention cannot be removed as it would break the - in-reply-to-status-id semantics. Attempting to remove it will be - silently ignored. - :param attachment_url: In order for a URL to not be counted in the status - body of an extended Tweet, provide a URL as a Tweet attachment. This URL - must be a Tweet permalink, or Direct Message deep link. Arbitrary, - non-Twitter URLs must remain in the status text. URLs passed to the - attachment_url parameter not matching either a Tweet permalink or Direct - Message deep link will fail at Tweet creation and cause an exception. - :param media_ids: A list of media_ids to associate with the Tweet. - You may include up to 4 photos or 1 animated GIF or 1 video in a Tweet. - :param possibly_sensitive: If you upload Tweet media that might be - considered sensitive content such as nudity, or medical procedures, you - must set this value to true. - :param lat: The latitude of the location this Tweet refers to. This - parameter will be ignored unless it is inside the range -90.0 to +90.0 - (North is positive) inclusive. It will also be ignored if there is no - corresponding long parameter. - :param long: The longitude of the location this Tweet refers to. The valid - ranges for longitude are -180.0 to +180.0 (East is positive) inclusive. - This parameter will be ignored if outside that range, if it is not a - number, if geo_enabled is disabled, or if there no corresponding lat - parameter. - :param place_id: A place in the world. - :param display_coordinates: Whether or not to put a pin on the exact - coordinates a Tweet has been sent from. - :param trim_user: |trim_user| - :param enable_dmcommands: When set to true, enables shortcode commands for - sending Direct Messages as part of the status text to send a Direct - Message to a user. When set to false, disables this behavior and includes - any leading characters in the status text that is posted - :param fail_dmcommands: When set to true, causes any status text that starts - with shortcode commands to return an API error. When set to false, allows - shortcode commands to be sent in the status text and acted on by the API. - :param card_uri: Associate an ads card with the Tweet using the card_uri - value from any ads card response. - :rtype: :class:`Status` object - - -.. method:: API.update_with_media(filename, [status], \ - [in_reply_to_status_id], \ - [auto_populate_reply_metadata], [lat], \ - [long], [source], [place_id], [file]) - - *Deprecated*: Use :func:`API.media_upload` instead. Update the authenticated - user's status. Statuses that are duplicates or too long will be silently - ignored. - - :param filename: The filename of the image to upload. This will - automatically be opened unless `file` is specified - :param status: The text of your status update. - :param in_reply_to_status_id: The ID of an existing status that the update - is in reply to. - :param auto_populate_reply_metadata: Whether to automatically include the - @mentions in the status metadata. - :param lat: The location's latitude that this tweet refers to. - :param long: The location's longitude that this tweet refers to. - :param source: Source of the update. Only supported by Identi.ca. Twitter - ignores this parameter. - :param place_id: Twitter ID of location which is listed in the Tweet if - geolocation is enabled for the user. - :param file: A file object, which will be used instead of opening - `filename`. `filename` is still required, for MIME type - detection and to use as a form field in the POST data - :rtype: :class:`Status` object - - -.. method:: API.destroy_status(id) - - Destroy the status specified by the id parameter. The authenticated user - must be the author of the status to destroy. - - :param id: |sid| - :rtype: :class:`Status` object - - -.. method:: API.retweet(id) - - Retweets a tweet. Requires the id of the tweet you are retweeting. - - :param id: |sid| - :rtype: :class:`Status` object - - -.. method:: API.retweeters(id, [cursor], [stringify_ids]) - - Returns up to 100 user IDs belonging to users who have retweeted the Tweet - specified by the id parameter. - - :param id: |sid| - :param cursor: |cursor| - :param stringify_ids: Have ids returned as strings instead. - :rtype: list of Integers - - -.. method:: API.retweets(id, [count]) - - Returns up to 100 of the first retweets of the given tweet. - - :param id: |sid| - :param count: Specifies the number of retweets to retrieve. - :rtype: list of :class:`Status` objects - - -.. method:: API.unretweet(id) - - Untweets a retweeted status. Requires the id of the retweet to unretweet. - - :param id: |sid| - :rtype: :class:`Status` object - - -User methods ------------- - -.. method:: API.get_user(id/user_id/screen_name) - - Returns information about the specified user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :rtype: :class:`User` object - - -.. method:: API.me() - - Returns the authenticated user's information. - - :rtype: :class:`User` object - - -.. method:: API.friends([id/user_id/screen_name], [cursor], [skip_status], \ - [include_user_entities]) - - Returns an user's friends ordered in which they were added 100 at a time. - If no user is specified it defaults to the authenticated user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param cursor: |cursor| - :param count: |count| - :param skip_status: |skip_status| - :param include_user_entities: |include_user_entities| - :rtype: list of :class:`User` objects - - -.. method:: API.followers([id/screen_name/user_id], [cursor]) - - Returns a user's followers ordered in which they were added. If no user is - specified by id/screen name, it defaults to the authenticated user. - - :param id: |uid| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param cursor: |cursor| - :param count: |count| - :param skip_status: |skip_status| - :param include_user_entities: |include_user_entities| - :rtype: list of :class:`User` objects - - -.. method:: API.lookup_users([user_ids], [screen_names], [include_entities], \ - [tweet_mode]) - - Returns fully-hydrated user objects for up to 100 users per request. - - There are a few things to note when using this method. - - * You must be following a protected user to be able to see their most recent - status update. If you don't follow a protected user their status will be - removed. - * The order of user IDs or screen names may not match the order of users in - the returned array. - * If a requested user is unknown, suspended, or deleted, then that user will - not be returned in the results list. - * If none of your lookup criteria can be satisfied by returning a user - object, a HTTP 404 will be thrown. - - :param user_ids: A list of user IDs, up to 100 are allowed in a single - request. - :param screen_names: A list of screen names, up to 100 are allowed in a - single request. - :param include_entities: |include_entities| - :param tweet_mode: Valid request values are compat and extended, which give - compatibility mode and extended mode, respectively for - Tweets that contain over 140 characters. - :rtype: list of :class:`User` objects - - -.. method:: API.search_users(q, [count], [page]) - - Run a search for users similar to Find People button on Twitter.com; the - same results returned by people search on Twitter.com will be returned by - using this API (about being listed in the People Search). It is only - possible to retrieve the first 1000 matches from this API. - - :param q: The query to run against people search. - :param count: Specifies the number of statuses to retrieve. - May not be greater than 20. - :param page: |page| - :rtype: list of :class:`User` objects - - -다이렉트 메시지(DM) 메소드 --------------------------- - -.. method:: API.get_direct_message([id], [full_text]) - - 지정한 DM을 반환합니다. - - :param id: |id| - :param full_text: |full_text| - :rtype: :class:`DirectMessage` 객체 - - -.. method:: API.list_direct_messages([count], [cursor]) - - 최근 30일 이내의 모든 DM의 내역(송수신 모두)을 반환합니다. 반환값은 - 시간역순으로 정렬되어 있습니다. - - :param count: |count| - :param cursor: |cursor| - :rtype: :class:`DirectMessage` 객체의 리스트 - - -.. method:: API.send_direct_message(recipient_id, text, [quick_reply_type], \ - [attachment_type], [attachment_media_id]) - - 인증한 사용자의 계정으로 지정한 사용자에게 DM을 보냅니다. - - :param recipient_id: DM을 받을 사용자의 ID - :param text: DM의 내용. 최대 글자수는 10000 - :param quick_reply_type: 사용자에게 표시할 빠른 응답 유형: - - * options - Options 객체의 배열(최대 20) - * text_input - Text Input 객체 - * location - Location 객체 - :param attachment_type: 첨부 유형. 미디어 또는 위치 등입니다. - :param attachment_media_id: 메시지와 연결할 미디어의 id. DM은 하나의 - 미디어 ID만을 참조할 수 있습니다. - :rtype: :class:`DirectMessage` 객체 - - -.. method:: API.destroy_direct_message(id) - - ID 매개변수가 지정하는 DM을 삭제합니다. 삭제하기 위해서는 인증된 - 사용자가 해당 DM의 수신자여야 합니다. DM은 사용자 콘텍스트에서 - 제공하는 인터페이스에서만 제거됩니다. 대화에 참여한 다른 사용자는 - 삭제한 이후에도 해당 DM에 접근할 수 있습니다. - - :param id: 삭제할 DM의 ID - :rtype: None - - -친구 관계 메소드 ----------------- - -.. method:: API.create_friendship(id/screen_name/user_id, [follow]) - - 지정한 사용자와 친구를 맺습니다. (일명 팔로우) - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param follow: 지정한 사용자를 팔로우 하고 대상 사용자에 대한 알림을 활성화합니다. - :rtype: :class:`User` 객체 - - -.. method:: API.destroy_friendship(id/screen_name/user_id) - - 지정한 사용자를 친구 삭제 합니다. (일명 언팔로우) - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` 객체 - - -.. method:: API.show_friendship(source_id/source_screen_name, \ - target_id/target_screen_name) - - 두 사용자의 관계에 대한 자세한 정보를 반환합니다. - - :param source_id: 주대상 사용자의 user_id - :param source_screen_name: 주대상 사용자의 screen_name - :param target_id: 대상 사용자의 user_id - :param target_screen_name: 대상 사용자의 screen_name - :rtype: :class:`Friendship` 객체 - - -.. method:: API.friends_ids(id/screen_name/user_id, [cursor]) - - 지정한 사용자가 팔로우한 사용자들의 ID를 담은 배열을 반환합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :rtype: 정수의 리스트 - - -.. method:: API.followers_ids(id/screen_name/user_id) - - 지정한 사용자를 팔로우한 사용자들의 ID를 담은 배열을 반환합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :rtype: 정수의 리스트 - - -계정 메소드 ------------ - -.. method:: API.verify_credentials([include_entities], [skip_status], \ - [include_email]) - - 제출한 사용자의 계정 사용 자격이 유효한지 판별합니다. - - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :param include_email: True로 설정한다면 이메일이 문자열 형태로 user 객체 안에 같이 - 반환됩니다. - :rtype: 자격이 유효하다면 :class:`User` 객체, 아니라면 False - - -.. method:: API.rate_limit_status() - - 지정한 리소스 그룹에 속하는 메소드들의 현재 속도 제한을 반환합니다. 애플리케이션 전용 인증을 - 사용하고 있다면, 이 메소드의 응답은 애플리케이션 전용 인증의 속도 제한의 상황을 나타냅니다. - - :param resources: 현재 속도 제한의 처리를 알고 싶은 리소스 그룹을 쉼표로 구분한 리스트 - :rtype: :class:`JSON` 객체 - - -.. method:: API.update_profile_image(filename) - - 인증된 사용자의 프로필 사진을 갱신합니다. 유효한 형식: GIF, JPG, PNG - - :param filename: 업로드할 이미지 파일의 로컬 경로. URL에 연결하는 것이 아닙니다! - :rtype: :class:`User` 객체 - - -.. method:: API.update_profile_background_image(filename) - - 인증된 사용자의 배경 사진을 업데이트 합니다. 유효한 형식: GIF, JPG, PNG - - :param filename: 업로드할 이미지 파일의 로컬 경로. URL에 연결하는 것이 아닙니다! - :rtype: :class:`User` 객체 - - -.. method:: API.update_profile([name], [url], [location], [description]) - - 설정 페이지의 계정 탭에서 설정할 수 있는 값을 설정합니다. - - :param name: 최대 20글자 - :param url: 최대 100글자. - "http://"가 없는 경우 덧붙입니다. - :param location: 최대 30글자 - :param description: 최대 100글자 - :rtype: :class:`User` 객체 - - -마음에 들어요 메소드 --------------------- - -.. method:: API.favorites([id], [page]) - - 인증된 유저 또는 ID 매개변수로 특정되는 유저가 마음에 들어요를 누른 status들을 - 반환합니다. - - :param id: 마음에 들어요 목록을 요청할 사용자의 ID나 닉네임 - :param page: |page| - :rtype: :class:`Status` 객체의 리스트 - - -.. method:: API.create_favorite(id) - - ID 매개변수로 특정되는 status에 인증된 사용자의 계정으로 마음에 들어요를 누릅니다. - - :param id: |sid| - :rtype: :class:`Status` 객체 - - -.. method:: API.destroy_favorite(id) - - ID 매개변수로 특정되는 status에 인증된 사용자의 계정으로 마음에 들어요를 해제 합니다. - - :param id: |sid| - :rtype: :class:`Status` 객체 - - -차단 메소드 ------------ - -.. method:: API.create_block(id/screen_name/user_id) - - ID 매개변수로 특정되는 사용자를 인증된 사용자의 계정에서 차단합니다. 차단된 사용자를 - 팔로우 중이었을 경우 언팔로우 합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` 객체 - - -.. method:: API.destroy_block(id/screen_name/user_id) - - 인증된 사용자의 계정에서 ID 매개변수로 특정되는 사용자의 계정의 차단을 해제 합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` 객체 - - -.. method:: API.blocks([page]) - - 인증된 사용자가 차단한 사용자들의 user 객체의 배열을 반환합니다. - - :param page: |page| - :rtype: :class:`User` 객체의 리스트 - - -.. method:: API.blocks_ids([cursor]) - - 인증된 사용자가 차단한 사용자들의 ID의 배열을 반환합니다. - - :param cursor: |cursor| - :rtype: 정수의 리스트 - - -뮤트 메소드 -------------- - -.. method:: API.create_mute(id/screen_name/user_id) - - 인증된 사용자의 계정에서 ID로 특정되는 사용자를 뮤트합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` 객체 - - -.. method:: API.destroy_mute(id/screen_name/user_id) - - 인증된 사용자의 계정에서 ID로 특정되는 사용자의 뮤트를 해제합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :rtype: :class:`User` 객체 - - -.. method:: API.mutes([cursor], [include_entities], [skip_status]) - - 인증된 사용자가 뮤트한 사용자들의 user 객체의 배열을 반환합니다. - - :param cursor: |cursor| - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :rtype: :class:`User` 객체의 리스트 - - -.. method:: API.mutes_ids([cursor]) - - 인증된 사용자가 뮤트한 사용자들의 ID의 배열을 반환합니다. - - :param cursor: |cursor| - :rtype: 정수의 배열 - - -스팸 신고 메소드 ----------------------- - -.. method:: API.report_spam(id/screen_name/user_id, [perform_block]) - - ID 매개변수로 특정되는 사용자를 인증된 사용자의 계정에서 차단하고, 스팸 계정으로 신고합니다. - - :param id: |uid| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param perform_block: 신고한 계정을 차단할지 여부를 나타내는 논리값. 기본값은 True - :rtype: :class:`User` 객체 - - -검색어 저장 메소드 ----------------------- - -.. method:: API.saved_searches() - - 인증된 사용자 계정에 저장된 검색어 쿼리를 반환합니다. - - :rtype: :class:`SavedSearch` 객체의 리스트 - - -.. method:: API.get_saved_search(id) - - 주어진 ID로 특정되는 인증된 유저의 계정에 저장된 검색어로 데이터를 검색합니다. - - :param id: 검색할 검색어의 ID - :rtype: :class:`SavedSearch` 객체 - - -.. method:: API.create_saved_search(query) - - 인증된 사용자의 계정에 새로운 검색어를 저장합니다. - - :param query: 저장하고 싶은 검색어의 쿼리 - :rtype: :class:`SavedSearch` 객체 - - -.. method:: API.destroy_saved_search(id) - - 인증된 사용자의 계정에서 ID로 특정되는 검색어를 삭제합니다. 그 검색어는 인증된 사용자의 - 계정에 저장된 검색어여야 합니다. - - :param id: 삭제할 검색어의 ID - :rtype: :class:`SavedSearch` 객체 - - -편의 기능 메소드 ----------------- - -.. method:: API.search(q, [geocode], [lang], [locale], [result_type], \ - [count], [until], [since_id], [max_id], \ - [include_entities]) - - 지정한 쿼리와 관련된 트윗의 모음을 반환합니다. - - 트위터의 검색 서비스와, 더 나아가서 검색 API가 모든 트윗 소스에서 검색을 하는 것은 아니라는 것에 - 유의해주세요. 모든 트윗이 검색 인터페이스를 통해 색인화 되어있거나 검색할 수 있게 만들어져 있지는 - 않습니다. - - API v1.1에서는, 검색 API의 응답 형식이 REST API나 플랫폼을 통해서 볼 수 있는 객체와 더 비슷한 - 트윗 객체를 반환하도록 향상되었습니다. 하지만, perspectival 속성(인증된 유저에 의존하는 필드)은 - 현재 지원하지 않습니다.\ [#]_\ [#]_ - - :param q: 연산자를 포함하여 최대 500자의 검색하고자 하는 문자열 쿼리. 쿼리는 추가적으로 복잡도에 - 따라 제한될 수 있습니다. - :param geocode: 주어진 위도, 경도의 주어진 반경 내에 위치한 유저의 트윗만 반환합니다. 위치는 - 우선적으로 위치 정보 삽입 API에서 받아오지만, 트위터 프로필 내의 정보로 대체할 수 있습니다. - 매개변수의 값은 "위도,경도,반경"의 형태로 지정되며, 반경은 "mi"(마일) 또는 "km"(킬로미터) - 단위로 주어져야 합니다. API를 통해 근거리 연산자를 사용하여 임의의 위치를 geocode로 입력할 - 수는 없다는 점을 유의해주세요. 다만 이 geocode 매개변수를 통해 근처의 지오코드를 검색할 수는 - 있습니다. 반경 수식어를 사용할 경우에는 최대 1,000개의 분명하게 구분되는 "하위 영역"을 고려할 - 할 것입니다. - :param lang: 트윗을 ISO 639-1 코드로 주어진 언어로 제한합니다. 언어 탐지가 적절하게 작동했다고 - 전제합니다. - :param locale: 전송한 쿼리의 언어를 명시하세요.(현재는 ja만 유효합니다.) 이는 언어별 사용자를 - 위한 것이며 대부분의 경우엔 기본값이 작동합니다. - :param result_type: 얻고 싶은 검색 결과의 형식에 대해 명시하세요. 현재 기본값은 "mixed"이며 - 유효한 값은 다음과 같습니다.: - - * mixed : 응답에 인기 결과와 실시간 결과 모두를 포함합니다. - * recent : 응답으로 가장 최근의 결과만을 반환합니다. - * popular : 응답으로 가장 인기 있는 결과만을 반환합니다. - :param count: |count| - :param until: 주어진 날짜 이전에 만들어진 트윗을 반환합니다. 날짜는 YYYY-MM-DD의 형식으로 주어야 - 합니다. 검색 색인은 7일동안만 유지됩니다. 다시 말해서 일주일 이상 지난 트윗은 찾을 수 없습니다. - :param since_id: |since_id| API를 통해서 접근할 수 있는 트윗의 수에는 제한이 있습니다. since_id - 이후로 트윗 수 제한을 초과한다면, since_id는 제한을 초과하지 않는 가장 오래된 ID로 강제 설정됩니다. - :param max_id: |max_id| - :param include_entities: |include_entities| - :rtype: :class:`SearchResults` 객체 - - -List 메소드 ------------- - -.. method:: API.create_list(name, [mode], [description]) - - 인증된 사용자에 대한 새 목록을 생성합니다. - 계정 당 최대 1000개의 목록을 생성할 수 있음에 유의하세요. - - :param name: 새 목록의 이름. - :param mode: |list_mode| - :param description: 생성 중인 목록에 대한 설명. - :rtype: :class:`List` object - - -.. method:: API.destroy_list([owner_screen_name/owner_id], list_id/slug) - - 지정된 목록을 삭제합니다. - 인증된 사용자는 삭제하기 위해 해당 목록을 소유해야 합니다. - - :param owner_screen_name: |owner_screen_name| - :param owner_id: |owner_id| - :param list_id: |list_id| - :param slug: |slug| - :rtype: :class:`List` object - - -.. method:: API.update_list(list_id/slug, [name], [mode], [description], \ - [owner_screen_name/owner_id]) - - 지정한 목록을 업데이트합니다. - 인증된 사용자는 업데이트하기 위해 해당 목록을 소유해야 합니다. - - :param list_id: |list_id| - :param slug: |slug| - :param name: 새 목록의 이름. - :param mode: |list_mode| - :param description: 목록에 부여할 설명. - :param owner_screen_name: |owner_screen_name| - :param owner_id: |owner_id| - :rtype: :class:`List` object - - -.. method:: API.lists_all([screen_name], [user_id], [reverse]) - - 인증된 사용자 또는 지정된 사용자가 가입한 모든 목록(소유한 목록 포함)을 반환합니다. - user_id나 screen_name 매개변수를 사용하여 사용자를 지정합니다. - 만약 사용자를 지정하지 않는 경우, 인증된 사용자가 사용됩니다. - - 이 호출로 최대 100개의 결과가 반환될 것입니다. - 가입자 목록들이 먼저 반환되고, 이후에 소유한 목록들이 반환됩니다. - 따라서 만약 유저가 90개의 목록에 가입하고 20개의 목록을 소유한다면, - 메소드는 90개의 가입 목록과 10개의 소유 목록을 반환합니다. - 매개변수가 reverse=true인 반대의 메소드인 경우, 소유 목록을 먼저 반환하므로 - 20개의 소유목록과 80개의 가입 목록을 반환합니다. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param reverse: 소유 목록을 먼저 반환할지에 대한 참/거짓 여부. 이 매개변수가 어떻게 작동하는지에 대한 정보는 위의 설명을 참조하세요. - - :rtype: list of :class:`List` objects - - -.. method:: API.lists_memberships([screen_name], [user_id], \ - [filter_to_owned_lists], [cursor], [count]) - - 사용자가 추가된 목록들을 반환합니다. - user_id 또는 screen_name을 입력하지 않으면 인증된 사용자에 대한 멤버쉽이 반환됩니다. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param filter_to_owned_lists: 인증된 사용자 소유의 목록들을 반환할지에 대한 참/거짓 여부. user_id 또는 screen_name으로 표현되는 사용자 또한 같습니다. - - :param cursor: |cursor| - :param count: |count| - - :rtype: list of :class:`List` objects - - -.. method:: API.lists_subscriptions([screen_name], [user_id], [cursor], \ - [count]) - - 지정된 사용자가 구독하는 목록들의 모음(기본적으로 페이지 당 20개의 목록)을 얻습니다. - 사용자 자신의 목록은 포함하지 않습니다. - - :param screen_name: |screen_name| - :param user_id: |user_id| - :param cursor: |cursor| - :param count: |count| - :rtype: list of :class:`List` objects - - -.. method:: API.list_timeline(list_id/slug, [owner_id/owner_screen_name], \ - [since_id], [max_id], [count], \ - [include_entities], [include_rts]) - - 지정된 목록의 구성원이 작성한 트윗들의 타임라인을 반환합니다. - 기본적으로 리트윗이 포함됩니다. 리트윗을 생략하려면 include_rts=false 매개변수를 이용하세요. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param since_id: |since_id| - :param max_id: |max_id| - :param count: |count| - :param include_entities: |include_entities| - :param include_rts: 목록 타임라인에 표준 트윗 외의 리트윗(있는 경우)도 포함할지 여부에 대한 참/거짓 여부. 리트윗된 트윗의 출력 형식은 홈 타임라인에서 보는 표현 방식과 동일합니다. - - :rtype: list of :class:`Status` objects - - -.. method:: API.get_list(list_id/slug, [owner_id/owner_screen_name]) - - 지정된 목록을 반환합니다. - private상태의 목록들은 오직 인증된 사용자가 지정된 목록을 소유한 경우에만 보여집니다. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.add_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 목록에 구성원을 추가합니다. - 인증된 사용자는 목록에 구성원을 추가하기 위해 목록을 소유해야 하며, 목록은 최대 5000명으로 제한되어 있습니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.add_list_members(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 목록에 최대 100명의 구성원들을 추가합니다. - 인증된 사용자는 목록에 구성원을 추가하기 위해 목록을 소유해야 하며, 목록은 최대 5000명으로 제한되어 있습니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: 콤마로 닉네임 목록을 구분하며, 한 요청 당 100회로 제한됩니다. - :param user_id: 콤마로 사용자 ID 목록을 구분하며, 한 요청 당 100회로 제한됩니다. - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.remove_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 목록에서 지정된 구성원을 제외합니다. - 인증된 사용자는 목록에 구성원을 제외하기 위해 목록을 소유해야 합니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.remove_list_members(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 목록에서 최대 100명의 구성원을 제외합니다. - 인증된 사용자는 목록에 구성원을 제외하기 위해 목록을 소유해야 하며, 목록은 최대 5000명으로 제한되어 있습니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: 콤마로 닉네임 목록을 구분하며, 한 요청 당 100회로 제한됩니다. - :param user_id: 콤마로 사용자 ID 목록을 구분하며, 한 요청 당 100회로 제한됩니다. - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.list_members(list_id/slug, [owner_id/owner_screen_name], \ - [cursor]) - - 지정된 목록의 구성원들을 반환합니다. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param cursor: |cursor| - :rtype: list of :class:`User` objects - - -.. method:: API.show_list_member(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 지정된 사용자가 지정된 목록의 구성원인지 확인합니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`User` object if user is a member of list - - -.. method:: API.subscribe_list(list_id/slug, [owner_id/owner_screen_name]) - - 인증된 사용자를 지정된 목록에 구독시킵니다. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.unsubscribe_list(list_id/slug, [owner_id/owner_screen_name]) - - 인증된 사용자를 지정된 목록으로부터 구독 취소시킵니다. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`List` object - - -.. method:: API.list_subscribers(list_id/slug, [owner_id/owner_screen_name], \ - [cursor], [count], [include_entities], \ - [skip_status]) - - 지정된 목록의 구독자들을 반환합니다. - private 상태의 목록 구독자들은 인증된 사용자가 지정된 목록을 소유하는 경우에만 표시됩니다. - - :param list_id: |list_id| - :param slug: |slug| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :param cursor: |cursor| - :param count: |count| - :param include_entities: |include_entities| - :param skip_status: |skip_status| - :rtype: list of :class:`User` objects - - -.. method:: API.show_list_subscriber(list_id/slug, screen_name/user_id, \ - [owner_id/owner_screen_name]) - - 지정된 사용자가 지정된 목록의 구독자인지 확인합니다. - - :param list_id: |list_id| - :param slug: |slug| - :param screen_name: |screen_name| - :param user_id: |user_id| - :param owner_id: |owner_id| - :param owner_screen_name: |owner_screen_name| - :rtype: :class:`User` object if user is subscribed to list - - -Trends Methods --------------- - -.. method:: API.trends_available() - - Twitter가 트렌드 정보를 가진 위치를 반환합니다. - 반환은 WOEID(The Yahoo! Where On Earth ID)를 인코딩한 “location"의 배열과 - 정규 명칭 및 위치가 속한 국가같이 인간이 읽을 수 있는 정보로 이루어집니다. - - :rtype: :class:`JSON` object - - -.. method:: API.trends_place(id, [exclude]) - - 트렌드 정보를 이용할 수 있는 경우, 특정 WOEID에 대한 상위 50개의 트렌드를 반환합니다. - - 반환은 트렌드의 이름을 인코딩한 "trend" 객체 배열, 트위터 검색에서 주제를 검색하는 데 - 사용할 수 있는 쿼리 매개변수, 트위터 검색 URL로 이루어집니다. - - 이 정보는 5분마다 캐싱됩니다. - 이보다 더 자주 요청하면 더 이상 데이터가 반환되지 않으며, 제한 사용량 비율에 반하여 계산합니다. - - 최근 24시간 동안의 tweet_volume도 이용할 수 있다면 많은 트렌드에 맞게 반환됩니다. - - :param id: 트렌드 정보를 반환할 The Yahoo! Where On Earth ID. - 글로벌 정보는 WOEID를 1로 사용하여 이용할 수 있습니다. - - :param exclude: 이것을 해시태그와 동일하게 설정하면 트렌드 목록에서 모든 해시태그를 제거합니다. - :rtype: :class:`JSON` object - - -.. method:: API.trends_closest(lat, long) - - Twitter가 지정된 위치로부터 트렌드 정보를 가지고 있는 가장 가까운 위치를 반환합니다. - - 반환은 WOEID를 인코딩한 “location"의 배열과 정규 명칭 및 위치가 속한 국가같이 - 인간이 읽을 수 있는 정보로 이루어집니다. - - WOEID는 Yahoo! Where On Earth ID를 뜻합니다. - - :param lat: long 매개변수와 함께 제공되면 이용 가능한 트렌드 위치는 거리별로 가장 가까운 위치부터 가장 먼 위치까지 좌표 쌍으로 정렬됩니다. 경도의 유효 범위는 -180.0~+180.0(서쪽은 음수, 동쪽은 양수)입니다. - - :param long: at 매개변수와 함께 제공되면 이용 가능한 트렌드 위치는 거리별로 가장 가까운 위치부터 가장 먼 위치까지 좌표 쌍으로 정렬됩니다. 경도의 유효 범위는 -180.0~+180.0(서쪽은 음수, 동쪽은 양수)입니다. - - :rtype: :class:`JSON` object - - -Geo Methods ------------ - -.. method:: API.reverse_geocode([lat], [long], [accuracy], [granularity], \ - [max_results]) - - 위도와 경도가 주어진 경우, `update_status()`를 위치의 이름을 나타내기 위해 - 호출하여 지정될 수 있는 ID를 가진 장소(도시와 그 인접)를 찾습니다. - 이 호출은 해당 위치에 대한 상세한 반환을 제공하므로, `nearby_places()` 메소드는 - 그다지 상세하지 않은 근처 장소의 목록을 얻는 데 사용하는 것이 추천됩니다. - - :param lat: 위치의 위도. - :param long: 위치의 경도. - :param accuracy: 숫자로 검색할 “region"을 지정합니다. 이 경우 미터로의 반경이지만, feet 단위로 지정하기 위해 ft와 접해있는 문자열도 사용할 수 있습니다. 입력되지 않으면 0m로 가정합니다. - - :param granularity: 기본적으로 ‘neighborhood’로 가정하지만 'city'일 수도 있습니다. - :param max_results: 반환할 최대 결과 숫자에 대한 힌트. 이것은 단지 지침일 뿐, 지켜지지 않을 수도 있습니다. - - -.. method:: API.geo_id(id) - - 장소에 대한 ID를 지정하면 장소에 대한 더 자세한 정보를 제공합니다. - - :param id: 위치의 유효한 Twitter ID. - - -Utility methods ---------------- - -.. method:: API.configuration() - - 사용자 이름이 아닌 twitter.com 슬러그, 최대 사진 해상도, t.co 단축된 URL 길이 등을 포함한 - Twitter에서 사용하는 현재 구성을 반환합니다. 응용 프로그램이 로드될 때 이 endpoint를 - 요청하는 것이 추천되지만, 하루에 1번 이상 요청하지 않는 것이 좋습니다. - - -Media methods -------------- - -.. method:: API.media_upload(filename, [file]) - - 이 endpoint를 사용하여 Twitter에 이미지를 업로드하세요. - - :param filename: 업로드할 이미지의 파일 이름. ``file``이 자동으로 지정되지 않는 한 자동으로 열리게 됩니다. - - :param file: ``filename``을 여는 대신 사용할 파일 객체. MME 타입 형식 감지 및 POST 데이터에서 양식 필드로 사용하려면 ``filename``도 필요합니다. - - :rtype: :class:`Media` object - - -.. method:: API.create_media_metadata(media_id, alt_text) - - 이 endpoint는 업로드된 media_id에 대한 추가적인 정보를 제공하는데 사용될 수 있습니다. - 이 기능은 현재 이미지와 GIF에서만 지원됩니다. - image al text와 같은 추가적인 metadata를 연결하려면 이 endpoint를 호출하세요. - - :param media_id: alt text를 추가할 media의 ID - :param alt_text: 이미지에 추가할 Alt text - - -:mod:`tweepy.error` --- Exceptions -================================== - - 예외는 ``tweepy`` 모듈에서 직접 이용 가능하며, 이것은 ``tweepy.error`` 자체를 가져올 필요가 없다는 것을 의미합니다. - 예를 들어, ``tweepy.error.TweepError`` 는 ``tweepy.TweepError`` 로 이용 가능합니다. - - -.. exception:: TweepError - - Tweepy가 사용하는 주요 예외. 많은 이유로 발생합니다. - - Twiiter가 응답한 오류로 인해 ``TweepError`` 가 발생하면, ``TweepError.response.text`` 에서 - 에러 코드(API 문서에서 설명된 대로)에 접근할 수 있습니다. - 단, ``TweepError`` 는 다른 것을 메시지(예: 일반적인 에러 문자열)로 표시하여 발생할 수도 있음에 유의하십시오. - - -.. exception:: RateLimitError - - API 메소드가 Twitter의 rate-limit에 도달하여 실패할 때 발생합니다. - rate-limit을 특별히 쉽게 다룰 수 있도록 제작했습니다. - - `TweepError` 로부터 상속받으므로, ``except TweepError`` 또한 ``RateLimitError`` 를 잡을 수 있을겁니다. - - -.. rubric:: Footnotes - -.. [#] https://web.archive.org/web/20170829051949/https://dev.twitter.com/rest/reference/get/search/tweets -.. [#] https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-is-already-favorited-by-the-user/11145 diff --git a/docs/ko-KR/auth_tutorial.rst b/docs/ko-KR/auth_tutorial.rst deleted file mode 100644 index 078bbdd..0000000 --- a/docs/ko-KR/auth_tutorial.rst +++ /dev/null @@ -1,124 +0,0 @@ -.. _auth_tutorial: - - -*********************** -인증 지침 -*********************** - -들어가며 -============ - -Tweepy는 OAuth 1a(응용 프로그램-사용자)와 OAuth 2a(응용프로그램 전용)을 모두 지원합니다. -인증은 tweepy.AuthHandler 클래스를 통해 처리합니다. - -OAuth 1a 인증 -======================= - -Tweepy는 OAuth 1a를 가능한 편리하게 제공하기 위해 노력합니다. -과정을 시작하기 위해선 클라이언트 응용 프로그램을 등록할 필요가 있습니다. -새로운 응용 프로그램을 생성하고 끝내기 위해선 consumer key와 secret을 가져야 합니다. -이 2가지는 필요하므로 잘 보관합시다. - -다음 단계는 OAuthHandler 인스턴스를 생성하는 것입니다. -여기서 이전 단락에서 주어진 consumer key와 secret을 전달합니다:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - -웹 응용 프로그램이 있고 동적일 필요가 있는 콜백 URL을 사용하는 경우에는 다음과 같이 전달합니다:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret, - callback_url) - -콜백 URL을 변경하지 않을 경우, 응용 프로그램의 프로필을 설정할 때 twitter.com에서 정적으로 설정하는 것이 가장 좋습니다. - -기초적인 인증과는 다르게, 우리는 API를 사용하기 전에 다음의 "OAuth 1a Dance"과정이 필요합니다. -다음의 과정을 완벽하게 따라해야 합니다. - -#. 트위터에서 요청 토큰을 가져오세요. - -#. 사용자를 twitter.com으로 리다이렉트 시켜서 응용 프로그램을 인증하세요. - -#. 콜백을 이용하는 경우, 트위터는 사용자를 우리에게 리다이렉트 할 것입니다. 그렇지 않으면 사용자가 수동으로 검증 코드를 제공해야만 합니다. - -#. 공인된 요청 토큰을 접근을 위한 토큰으로 교체하세요. - -그러면, 동작을 위해 우리의 요청 토큰을 가져 옵시다:: - - try: - redirect_url = auth.get_authorization_url() - except tweepy.TweepError: - print('에러! 요청 토큰을 받는데 실패했습니다.') - -이 명령은 트위터를 통하여 토큰을 요청하고, 사용자가 인증을 위해 리다이렉트 해야하는 인증 URL을 반환합니다. -만약 데스크탑 응용 프로그램인 경우, 사용자가 돌아올 때까지 OAuthHandler 인스턴스를 유지할 수 있습니다. -따라서 요청 토큰은 콜백 URL 요청에 필요하므로 세션에 저장해야 합니다. -다음은 요청한 토큰을 세션에 저장하는 예시 코드입니다:: - - session.set('request_token', auth.request_token['oauth_token']) - -이제 get_authorization_url() 메소드를 통하여 이전에 반환된 URL로 사용자를 리다이렉트 할 수 있습니다. - -만약 데스크탑 응용 프로그램(또는 콜백을 사용하지 않는 응용 프로그램)이라면, 트위터가 승인 후 제공하는 “검증 코드”를 사용자에게 요구해야 합니다. -웹 응용 프로그램 내에서 이 검증 코드는 URL에서 GET 쿼리 매개변수의 형태로 트위터의 콜백 요청에 의해 제공됩니다. - -.. code-block :: python - - # 콜백 사용 예시 (웹) - verifier = request.GET.get('oauth_verifier') - - # 콜백 w/o 예시 (데스크톱) - verifier = raw_input('Verifier:') - -마지막 단계는 요청 토큰을 접근 토근으로 교체하는 것입니다. -접근 토큰은 트위터 API라는 보물 상자에 접근하기 위한 “열쇠”입니다. -이 토큰을 가져오기 위해 다음을 해야합니다:: - - # 이것이 웹 응용 프로그램이라 가정하면, 인증 핸들러를 다시 만들 필요가 있음 - # 우선... - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - token = session.get('request_token') - session.delete('request_token') - auth.request_token = { 'oauth_token' : token, - 'oauth_token_secret' : verifier } - - try: - auth.get_access_token(verifier) - except tweepy.TweepError: - print('에러! 접근 토큰을 받는데 실패했습니다.') - -이것은 접근 토큰을 추후에 사용하기 위한 좋은 저장 방식입니다. -수시로 재접근할 필요가 없습니다. 트위터는 현재 토큰을 만료시키지 않으므로, 비활성화 되는 때는 사용자가 응용 프로그램 접근을 취소할 때입니다. -접근 토큰을 저장하는 방법은 응용 프로그램에 따라 달라지지만, 기본적으로 key와 secret 문자열 값은 저장할 필요가 있습니다:: - - auth.access_token - auth.access_token_secret - -토큰 값은 데이터베이스, 파일, 그 외 데이터 저장 장소에 저장이 가능합니다. -저장된 접근 토큰으로 다시 OAuthHandler를 다시 실행하기 위해선 다음을 해야 합니다:: - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(key, secret) - -OAuthHandler가 접근 토큰을 받아들였다면, 이제 다음 명령을 수행할 준비가 되었습니다:: - - api = tweepy.API(auth) - api.update_status('tweepy + oauth!') - -OAuth 2 인증 -====================== - -Tweepy는 OAuth 2 인증 방식도 지원합니다. -OAuth 2는 응용 프로그램이 사용자 없이 API 요청을 하는 인증 방식입니다. -공공 정보에 대해 읽기 전용 접근만 필요한 경우 이 방식을 사용하세요. - -OAuth 1a처럼, 먼저 클라이언트 응용프로그램을 등록하고 consumer key와 secret값을 얻어야 합니다. - -그 다음 AppAuthHandler 인스턴스를 생성하고, consumer key와 secret을 전달합니다:: - - auth = tweepy.AppAuthHandler(consumer_key, consumer_secret) - -토큰을 받았다면, 이제 작업을 시작할 준비가 되었습니다:: - - api = tweepy.API(auth) - for tweet in tweepy.Cursor(api.search, q='tweepy').items(10): - print(tweet.text) diff --git a/docs/ko-KR/code_snippet.rst b/docs/ko-KR/code_snippet.rst deleted file mode 100644 index 38b9755..0000000 --- a/docs/ko-KR/code_snippet.rst +++ /dev/null @@ -1,75 +0,0 @@ -.. _code_snippet: - - -************* -코드 조각 -************* - -소개 -============ - -여기에는 당신이 트위피를 사용하는 데에 도움을 줄 몇 개의 코드 조각들이 있습니다. 마음껏 당신의 코드로 기여하거나 여기 있는 코드를 개선해주세요! - -OAuth -===== - -.. code-block :: python - - auth = tweepy.OAuthHandler("consumer_key", "consumer_secret") - - # 권한을 얻기 위해 트위터로 리다이렉트 - redirect_user(auth.get_authorization_url()) - - # 접근 토큰을 얻음 - auth.get_access_token("verifier_value") - - # API 인스턴스를 생성 - api = tweepy.API(auth) - -페이지 나누기 -============= - -.. code-block :: python - - # 인증된 사용자의 모든 친구 사이를 반복 - for friend in tweepy.Cursor(api.friends).items(): - # 여기서 friend의 처리 - process_friend(friend) - - # 타임라인의 가장 처음 200개의 status 사이를 반복 - for status in tweepy.Cursor(api.home_timeline).items(200): - # 여기서 status의 처리 - process_status(status) - -모든 팔로워를 팔로우 -==================== - -이 코드는 인증된 사용자의 모든 팔로워를 팔로우 하도록 합니다. - -.. code-block :: python - - for follower in tweepy.Cursor(api.followers).items(): - follower.follow() - -커서 이용 속도 제한의 처리 -========================== - -커서는 커서 안의 ``next()``\ 메소드 안에서 ``RateLimitError``\ 를 일으킵니다. 이 오류는 커서를 반복자로 감쌈으로써 처리할 수 있습니다. - -이 코드를 실행하면 당신이 팔로우한 모든 유저 중 300명 이하를 팔로우하는 유저들을 출력하고, 속도 제한에 도달할 때마다 15분간 기다릴 것입니다. 이 코드는 명백한 스팸봇을 제외하기 위한 예제입니다. - -.. code-block :: python - - # 이 예제에서 처리자는 time.sleep(15*60) - # 하지만 물론 당신이 원하는 어떤 방법으로든 처리 가능 - - def limit_handled(cursor): - while True: - try: - yield cursor.next() - except tweepy.RateLimitError: - time.sleep(15 * 60) - - for follower in limit_handled(tweepy.Cursor(api.followers).items()): - if follower.friends_count < 300: - print(follower.screen_name) diff --git a/docs/ko-KR/conf.py b/docs/ko-KR/conf.py deleted file mode 100644 index d948d7e..0000000 --- a/docs/ko-KR/conf.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -# -# tweepy documentation build configuration file, created by -# sphinx-quickstart on Sun Dec 6 11:13:52 2009. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -import sys - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('.')) -sys.path.append(os.path.abspath('..')) - -# -- General configuration ----------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc'] - -# Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -source_encoding = 'UTF-8' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'tweepy' -copyright = u'2009-2019, Joshua Roesslein' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -sys.path.insert(0, '..') -from tweepy import __version__ - -version = __version__ -# The full version, including alpha/beta/rc tags. -release = __version__ - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -locale_dirs = ['locale/'] -language = 'ko' - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of documents that shouldn't be included in the build. -#unused_docs = [] - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -html_use_modindex = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = '' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'tweepydoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'tweepy.tex', u'tweepy Documentation', - u'Joshua Roesslein', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_use_modindex = True diff --git a/docs/ko-KR/cursor_tutorial.rst b/docs/ko-KR/cursor_tutorial.rst deleted file mode 100644 index ea72bb6..0000000 --- a/docs/ko-KR/cursor_tutorial.rst +++ /dev/null @@ -1,86 +0,0 @@ -.. _cursor_tutorial: - -*************** -커서 지침 -*************** - -이 지침은 커서 객체를 이용한 페이징에 대한 세부 사항을 설명합니다. - -들어가며 -============ - -트위터 API 개발에서 페이징은 타임라인 반복, 사용자 목록, 쪽지, 그 외 여러 곳에서 자주 사용됩니다. -페이징을 수행하기 위해선 요청마다 페이지/커서 매개변수를 전달해야 합니다. -여기서 문제는 페이징 루프를 관리하기 위해선 많은 표준 코드를 필요로 한다는 점입니다. -트위피는 페이징을 더 쉽고 적은 코드로 돕기 위해 커서 객체를 가지고 있습니다. - -구식 방법 vs 커서 방법 -====================== - -먼저 인증된 사용자의 타임라인 내에서 status를 반복하는 방법을 구현해봅시다. -커서 객체가 도입되기 전에 사용하던 “구식 방법”은 다음과 같습니다:: - - page = 1 - while True: - statuses = api.user_timeline(page=page) - if statuses: - for status in statuses: - # process status here - process_status(status) - else: - # All done - break - page += 1 # next page - -보시다시피, 페이징 루프마다 "page" 매개변수를 수동으로 관리해야 합니다. -다음은 커서 객체를 사용하는 코드 버전입니다:: - - for status in tweepy.Cursor(api.user_timeline).items(): - # process status here - process_status(status) - -훨씬 좋아보입니다! 커서가 씬 뒤에서 모든 페이징 작업을 처리하므로, 결과 처리를 위한 코드에만 집중 할 수 있습니다. - -API 메소드로 매개변수 전달하기 -====================================== - -API 메소드로 매개변수를 전달해야 한다면 어떻게 하시겠습니까? - -.. code-block :: python - - api.user_timeline(id="twitter") - -커서를 호출 가능으로 전달했기 때문에, 메소드에 직접적으로 매개변수를 전달 할 수 없습니다. -대신 커서 생성자 메소드로 매개변수를 전달합니다:: - - tweepy.Cursor(api.user_timeline, id="twitter") - -이제 커서는 요청만 하면 매개변수를 전달해 줄 것입니다. - -항목과 페이지 -============== - -지금까지 항목당 페이징을 반복하는 방법을 구현해보았습니다. -페이지별로 결과를 처리하려면 어떻게 하시겠습니까? -pages() 메소드를 사용해보세요:: - - for page in tweepy.Cursor(api.user_timeline).pages(): - # 페이지는 status의 목록임 - process_page(page) - - -한계값 -====== - -n개의 항목이나 페이지만 반환하기를 원한다면 어떻게 하시겠습니까? -items()나 pages() 메소드를 통해 원하는 한계값을 전달 할 수 있습니다. - -.. code-block :: python - - # 처음에서 200개의 status만 반복시킴 - for status in tweepy.Cursor(api.user_timeline).items(200): - process_status(status) - - # 처음에서 3페이지 까지만 반복시킴 - for page in tweepy.Cursor(api.user_timeline).pages(3): - process_page(page) diff --git a/docs/ko-KR/extended_tweets.rst b/docs/ko-KR/extended_tweets.rst deleted file mode 100644 index c0670bc..0000000 --- a/docs/ko-KR/extended_tweets.rst +++ /dev/null @@ -1,127 +0,0 @@ -.. _extended_tweets: -.. _트위터의 Tweet 업데이트 관련 문서: https://developer.twitter.com/en/docs/tweets/tweet-updates - -*************** -확장된 트윗 -*************** - -이 문서는 `트위터의 Tweet 업데이트 관련 문서`_ 에 대한 보충입니다. - -들어가며 -======== - -2016년 5월 24일, 트위터는 이러한 자사 API의 변경사항에 대한 지원 및 -API 옵션의 업데이트에 대해 설명하는 초기 기술 문서와 관련, -답글 및 URL의 처리 및 -`게시 방법 `_ -에 대한 -`변경사항을 발표 `_ -했습니다.\ [#]_ - -또한 2017년 9월 26일, 트위터는 특정 언어에 대한 280자 트윗 작성을 -`테스트하기 시작 `_ -했으며,\ [#]_ 당해 11월 7일에 글자 수 제한으로 인한 부당한 요금 부과 등의 문제를을 해결하기 위해 -글자 수 제한을 상향 조정한다고 -`발표 `_ -했습니다.\ [#]_ - -표준 API 메소드 -=============== - -``tweepy.API`` 의 Status 객체를 반환하는 모든 메소드는 새로운 -``tweet_mode`` 매개변수를 받습니다. 유효한 형식의 매개변수로는 ``compat`` 과 -``extended`` 가 있으며, 이는 각각 호환성 모드 (Compatibility Mode)와 -확장 모드 (Extended Mode)를 제공합니다. - -전달받은 매개변수가 없을 경우, 기본값인 호환성 모드가 제공됩니다. - -호환성 모드 (Compatibility Mode) --------------------------------- - -기본적으로, 호환성 모드를 사용할 경우 ``tweepy.API`` 에 의해 반환되는 -Status 객체의 ``text`` 속성값에서 필요에 따라 140자를 초과하는 데이터가 잘린 후 버려집니다. -데이터를 잘라 냈을 경우, Status 객체의 ``truncated`` 속성값은 ``True`` 가 되며, -``entities`` 속성에는 범위 내의 데이터, 즉 잘린 후의 엔티티만이 채워지게 될 것입니다. -이는 Status 객체의 ``text`` 속성값에 줄임표 문자, 공백 그리고 -해당 트윗 자기 자신에 대한 영구적인 링크(Permalink)가 포함되는 것으로 식별이 가능합니다. - -확장 모드 (Extended Mode) -------------------------- - -확장 모드를 사용할 경우, Status 객체의 ``text`` 속성은 -잘리지 않은(Untruncated) 온전한 텍스트 데이터를 가지는 ``full_text`` 속성으로 대체됩니다. -이 때 Status 객체의 ``truncated`` 속성값은 ``False`` 가 될 것이며, -``entities`` 속성에는 모든 엔티티들이 채워지게 될 것입니다. -또한, Status 객체는 트윗 중 표시 가능한 컨텐츠의 내부 첫 부분(Inclusive Start)과 -외부 끝 부분(Exclusive End)을 가리키는, 두 가지 원소를 가지는 배열(Array) 형태의 -``display_text_range`` 라는 속성을 갖게 될 것입니다. - -스트리밍 -======== - -기본적으로, 스트림으로부터의 Status 객체에는 트윗의 원본 데이터(Raw data)와 -페이로드(Payload)에 대응하는 필드를 가진 ``extended_tweet`` 속성이 포함될 수 있습니다. -이 속성/필드는 '확장된 트윗'에만 존재하며, 하위 필드에 대한 딕셔너리가 포함되어 있습니다. -이 딕셔너리의 ``full_text`` 하위 필드/키에는 트윗에 대한 잘리지 않은(Untruncated), -온전한 텍스트 데이터가 포함될 것이며, ``entities`` 하위 필드/키에는 -모든 엔티티들이 채워지게 될 것입니다. -만약 확장된 엔티티가 있다면, ``extended_entities`` 하위 필드/키에 그 엔티티들이 채워질 것입니다. -추가적으로, ``display_text_range`` 하위 필드/키에는 -트윗 중 표시 가능한 컨텐츠의 내부 첫 부분(Inclusive Start)과 -외부 끝 부분(Exclusive End)을 가리키는, -두 가지 원소를 가지는 배열(Array) 형태의 데이터가 저장될 것입니다. - -리트윗 다루기 -============= - -리트윗을 다룰 때 확장 모드를 사용할 경우, -Status 객체의 ``full_text`` 속성이 리트윗된 트윗의 전체 텍스트를 포함하지 않고, -줄임표 문자 등으로 잘릴 수 있습니다. 물론 그렇다 하더라도, -리트윗 트윗에 대한 Status 객체의 ``retweeted_status`` 속성 그 자체가 -또 하나의 Status 객체이기 때문에, 해당 개체의 ``full_text`` 속성을 대신 사용할 수 있습니다. - -또, 이는 스트림으로부터의 리트윗 트윗에 대한 Status 객체 및 페이로드(Payload)에도 유사하게 적용됩니다. -``extended_tweet`` 으로부터의 딕셔너리에는 위와 비슷하게, 줄임표 문자 등으로 잘릴 수 있는 -``full_text`` 하위 필드/키가 포함되어 있습니다. -이 때 역시 리트윗된 Status 객체로부터의 (``retweeted_status`` 로부터의 속성/필드로부터의) -``extended_tweet`` 속성/필드를 대신 사용할 수 있습니다. - -예시 -==== - -아래의 예시는, ``tweepy.API`` 객체와 트윗에 대한 ``id`` 를 이용, -해당 트윗의 모든 텍스트를 온전하게 출력하는 예시입니다. -이 때 해당 트윗이 리트윗된 트윗일 경우, 리트윗된 트윗의 모든 텍스트를 출력합니다:: - - status = api.get_status(id, tweet_mode="extended") - try: - print(status.retweeted_status.full_text) - except AttributeError: # 리트윗이 아님 - print(status.full_text) - -``status`` 가 Retweet일 경우(리트윗된 트윗일 경우), ``status.full_text`` 가 잘릴 수 있습니다. - -아래의 ``StreamListener`` 를 위한 Status 이벤트 핸들러는, 트윗의 모든 텍스트를 출력합니다. -이 때, 해당 트윗이 리트윗된 트윗일 경우, 리트윗된 트윗의 모든 텍스트를 출력합니다:: - - def on_status(self, status): - if hasattr(status, "retweeted_status"): # 리트윗 트윗인지 확인 - try: - print(status.retweeted_status.extended_tweet["full_text"]) - except AttributeError: - print(status.retweeted_status.text) - else: - try: - print(status.extended_tweet["full_text"]) - except AttributeError: - print(status.text) - -``status`` 가 Retweet일 경우(리트윗된 트윗일 경우), -``extended_tweet`` 속성을 가지지 않을 것이며, -``status.full_text`` 가 잘릴 수 있습니다. - -.. rubric:: 각주 - -.. [#] https://twittercommunity.com/t/upcoming-changes-to-simplify-replies-and-links-in-tweets/67497 -.. [#] https://twittercommunity.com/t/testing-280-characters-for-certain-languages/94126 -.. [#] https://twittercommunity.com/t/updating-the-character-limit-and-the-twitter-text-library/96425 diff --git a/docs/ko-KR/getting_started.rst b/docs/ko-KR/getting_started.rst deleted file mode 100644 index 91c0571..0000000 --- a/docs/ko-KR/getting_started.rst +++ /dev/null @@ -1,62 +0,0 @@ -.. _getting_started: - - -*************** -Tweepy 시작하기 -*************** - -들어가며 -======== - -Tweepy가 처음이라면, 이 문서를 참조하시는 것을 권장합니다. -이 문서의 목표는 여러분이 Tweepy를 어떻게 설정하고 롤링하는지 -알게 되는 것입니다. 여기서는 세부적인 언급은 피할 것이며, -몇 가지 중요한 기초 사항들만 다룰 것입니다. - -Hello Tweepy -============ - -.. code-block :: python - - import tweepy - - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(access_token, access_token_secret) - - api = tweepy.API(auth) - - public_tweets = api.home_timeline() - for tweet in public_tweets: - print(tweet.text) - -위 예제는 내 타임라인의 트윗을 다운로드하여, 콘솔에 각 트윗을 텍스트로써 -출력하는 예제입니다. 참고로, 트위터는 모든 요청에 OAuth 인증을 요구합니다. -인증에 대한 보다 자세한 내용은 :ref:`auth_tutorial` 를 참고해주세요. - -API -=== - -API 클래스는 트위터의 모든 RESTful API 메소드에 대한 접근을 지원합니다. -각 메소드는 다양한 매개변수를 전달받고 적절한 값을 반환할 수 있습니다. -보다 자세한 내용은 :ref:`API Reference ` 를 참고해주세요. - -모델 (Models) -============= - -API 메소드를 호출할 때, 반환받는 것의 대부분은 Tweepy의 모델 클래스 인스턴스가 -될 것입니다. 이는 애플리케이션에서 사용 가능한, -트위터로부터 반환받은 데이터를 포함할 것입니다. -예를 들어, 아래의 코드는 User 모델을 반환합니다:: - - # Get the User object for twitter... - user = api.get_user('twitter') - -모델에는 다음과 같이, 사용 가능한 데이터 및 메소드가 포함되어 있습니다:: - - print(user.screen_name) - print(user.followers_count) - for friend in user.friends(): - print(friend.screen_name) - -모델에 대한 보다 자세한 내용은 ModelsReference를 참고해주세요. - diff --git a/docs/ko-KR/index.rst b/docs/ko-KR/index.rst deleted file mode 100644 index 514f433..0000000 --- a/docs/ko-KR/index.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. tweepy documentation master file, created by - sphinx-quickstart on Sun Dec 6 11:13:52 2009. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Tweepy 기술 문서 -================ - -내용: - -.. toctree:: - :maxdepth: 2 - - getting_started.rst - auth_tutorial.rst - code_snippet.rst - cursor_tutorial.rst - extended_tweets.rst - streaming_how_to.rst - api.rst - running_tests.rst - -인덱스와 Tables -================== - -* :ref:`genindex` -* :ref:`search` diff --git a/docs/ko-KR/install.rst b/docs/ko-KR/install.rst deleted file mode 100644 index f90629d..0000000 --- a/docs/ko-KR/install.rst +++ /dev/null @@ -1,13 +0,0 @@ -설치하기 -======== - -PyPI로부터 설치하기:: - - easy_install tweepy - -원본 소스코드로부터 설치하기:: - - git clone git://github.com/tweepy/tweepy.git - cd tweepy - python setup.py install - diff --git a/docs/ko-KR/make.bat b/docs/ko-KR/make.bat deleted file mode 100644 index 10adbcd..0000000 --- a/docs/ko-KR/make.bat +++ /dev/null @@ -1,113 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -set SPHINXBUILD=sphinx-build -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\tweepy.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\tweepy.ghc - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff --git a/docs/ko-KR/parameters.rst b/docs/ko-KR/parameters.rst deleted file mode 100644 index 3d2018f..0000000 --- a/docs/ko-KR/parameters.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. API parameters: - -.. |count| replace:: 페이지 당 시도하고 검색할 결과의 수. -.. |cursor| replace:: 결과를 페이지로 나눕니다. 페이징을 시작하려면 -1 값을 입력하세요. 응답 내용의 next_cursor와 previous_cursor 속성의 반환값을 입력해서 목록의 페이지를 앞뒤로 옮기세요. -.. |date| replace:: Permits specifying a start date for the report. The date should be formatted YYYY-MM-DD. -.. |exclude| replace:: Setting this equal to hashtags will remove all hashtags from the trends list. -.. |full_text| replace:: 메시지의 전문을 반환할지 여부를 확인하기 위한 논리값. False라면 140자로 잘린 메시지 내용을 반환하게 됩니다. 기본값은 False입니다. -.. |include_card_uri| replace:: A boolean indicating if the retrieved Tweet should include a card_uri attribute when there is an ads card attached to the Tweet and when that card was attached using the card_uri value. -.. |include_entities| replace:: false로 설정하면 엔티티 노드를 포함하지 않습니다. 기본값은 true. -.. |include_ext_alt_text| replace:: If alt text has been added to any attached media entities, this parameter will return an ext_alt_text value in the top-level key for the media entity. -.. |include_user_entities| replace:: The user object entities node will not be included when set to false. Defaults to true. -.. |list_id| replace:: 목록의 숫자ID. -.. |list_mode| replace:: 목록의 공개/비공개 여부. 변수는 public 또는 private가 될 수 있습니다. 지정하지 않으면 기본 값으로 public이 지정됩니다. -.. |list_owner| replace:: the screen name of the owner of the list -.. |max_id| replace:: ID가 지정된 ID보다 더 작은(즉, 더 이전의) 경우에만 반환합니다. -.. |owner_id| replace:: 슬러그에 의해 요청되는 목록을 소유한 사용자의 일련번호. -.. |owner_screen_name| replace:: 슬러그에 의해 요청되는 목록을 소유한 사용자의 계정 이름. -.. |page| replace:: 검색할 페이지를 지정합니더. 참고: 페이지 매김에 제한이 있습니다. -.. |screen_name| replace:: 사용자의 트위터 계정 이름을 지정하세요. 유효한 계정 이름과 사용자 일련번호가 같이 있다면 명확하게 하는 데 도움이 됩니다. -.. |sid| replace:: status의 ID. -.. |since_id| replace:: ID가 지정된 ID보다 더 큰(즉, 더 최근의) 경우에만 반환합니다. -.. |skip_status| replace:: 상태가 반환된 유저 객체들에 포함될지에 대한 참/거짓 여부. 기본값은 false. -.. |slug| replace:: 숫자 일련번호를 대신하여 목록을 식별할 수 있습니다. 이것을 사용하기로 결정한 경우, owner_id 또는 owner_screen_name 매개변수를 사용하여 목록 소유자도 지정해야 한다는 점에 유의하세요. -.. |trim_user| replace:: A boolean indicating if user IDs should be provided, instead of complete user objects. Defaults to False. -.. |uid| replace:: 사용자의 일련번호 또는 계정 이름을 명시하세요. -.. |user_id| replace:: 사용자의 일련번호를 지정하세요. 유효한 계정 이름과 유효한 일련번호가 같이 있다면 명확하게 하는 데 도움이 됩니다. - diff --git a/docs/ko-KR/running_tests.rst b/docs/ko-KR/running_tests.rst deleted file mode 100644 index 6e8ba64..0000000 --- a/docs/ko-KR/running_tests.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _running_tests: - -*********** -테스트하기 -*********** - -이 단계들은 트위피 실행을 테스트하는 방법의 대략적인 설명입니다: - -1. 트위피의 소스코드를 디렉토리에 다운로드하세요. - -2. 다운로드한 소스에서 ``test`` 의 추가 정보를 사용하여 설치하세요. (예시: ``pip install .[test]`` ) 추가적으로 ``tox`` 와 ``coverage`` 의 사용이 필요하다면 ``dev`` 추가 정보와 같이 설치해주세요. (예시: ``pip install .[dev,test]`` ) - -3. 소스 디렉토리에서 ``python setup.py nonsetests`` 또는 간단하게 ``nonsetests`` 를 실행시키세요. ``dev`` 추가 정보를 포함했다면 ``coverage`` 를 볼 수 있으며, ``tox`` 를 이용해 다른 버전의 파이썬으로 실행할 수도 있습니다. - -새로운 카세트를 기록하기 위해선 다음의 환경 변수들을 사용할 수 있어야 합니다: - -``TWITTER_USERNAME`` -``CONSUMER_KEY`` -``CONSUMER_SECRET`` -``ACCESS_KEY`` -``ACCESS_SECRET`` -``USE_REPLAY`` - -이는 단순히 ``USE_REPLAY`` 를 ``False`` 로 설정하고 앱과 계정의 자격 증명과 사용자의 이름을 제공하는 것입니다. \ No newline at end of file diff --git a/docs/ko-KR/streaming_how_to.rst b/docs/ko-KR/streaming_how_to.rst deleted file mode 100644 index 9c09b82..0000000 --- a/docs/ko-KR/streaming_how_to.rst +++ /dev/null @@ -1,88 +0,0 @@ -.. _streaming_how_to: -.. _트위터 스트리밍 API 설명서: https://developer.twitter.com/en/docs/tweets/filter-realtime/overview -.. _트위터 스트리밍 API 연결 설명서: https://developer.twitter.com/en/docs/tutorials/consuming-streaming-data -.. _트위터 응답 코드 설명서: https://dev.twitter.com/overview/api/response-codes - -************************ -Tweepy를 이용한 스트리밍 -************************ -Tweepy는 인증, 연결, 세션 생성 및 삭제, 수신 메시지 읽기 및 메시지 라우팅 등을 처리해줌으로써 트위터 스트리밍 API를 더 쉽게 사용할 수 있게 해줍니다. - -이 페이지는 당신이 Tweepy로 트위터 스트림을 사용하기 위한 첫 걸음을 제시하여 도움을 주는 것을 목표로 합니다. 트위터 스트리밍의 일부 기능은 여기에서 다루지 않습니다. 트위피 소스 코드의 streaming.py를 참조해주세요. - -트위터 스트림에 접근하기 위해선 API 인증이 필요합니다. 인증 과정에 도움이 필요하다면 :ref:`auth_tutorial` 를 참조해주세요. - -요약 -==== -트위터 스트리밍 API는 트위터의 메세지를 실시간으로 다운로드 하는 데에 사용됩니다. 대량의 트윗을 얻거나 사이트 스트림 또는 사용자 스트림을 사용해서 라이브 피드를 만드는 데에 유용합니다. `트위터 스트리밍 API 설명서`_.을 봐주세요. - -스트리밍 API는 REST API와는 상당히 다릅니다. 왜냐하면 REST API는 트위터에서 데이터를 가져오는 데에 사용되는 반면에 스트리밍 API는 메세지를 지속되는 세션으로 보내주기 때문입니다. 이를 통해 스트리밍 API는 REST API를 사용하는 것보다 더 많은 데이터를 실시간으로 다운로드 할 수 있습니다. - -Tweepy에서 **tweepy.Stream** 의 경우엔 스트리밍 세션을 설정하고, **StreamListener** 인스턴스에게 메시지를 보내는 일을 합니다. 스트림 수신자의 **on_data** 메소드는 모든 메시지를 수신하고 메시지의 종류에 따라 함수를 호출합니다. 기본 **StreamListener** 는 가장 일반적인 트위터 메시지를 분류하여 적절하게 설정된 메소드로 보낼 수 있습니다. 하지만 기본 **StreamListener** 의 메소드들은 스텁 메소드에 불과합니다. - -그러므로 스트리밍 API를 사용할 때는 다음의 세 단계를 거쳐야 합니다. - -1. **StreamListener** 를 상속받은 클래스를 생성 - -2. 그 클래스를 사용해서 **Stream** 객체를 생성 - -3. **Stream** 를 사용해서 트위터 API에 연결 - - -1단계: **StreamListener** 생성 -============================== -아래의 간단한 스트림 수신자는 status의 글을 출력합니다. Tweepy의 **StreamListener** 의 **on_data** 메소드는 손쉽게 status의 데이터를 **on_status** 메소드로 보내줍니다. **StreamListener** 를 상속받은 **MyStreamListener** 클래스를 생성하고 **on_status** 를 오버라이딩 합니다. :: - - import tweepy - #tweepy.StreamListener에 on_status의 로직을 추가해서 오버라이딩 - class MyStreamListener(tweepy.StreamListener): - - def on_status(self, status): - print(status.text) - -2단계: 스트림 생성 -================== -스트림을 얻기 위해선 api 인스턴스가 필요합니다. api 객체를 얻는 방법은 :ref:`auth_tutorial` 를 참조해주세요. api와 status 수신자를 얻어낸 후엔 스트림 객체를 만들 수 있습니다. :: - - myStreamListener = MyStreamListener() - myStream = tweepy.Stream(auth = api.auth, listener=myStreamListener) - -3단계: 스트림을 시작 -==================== -Tweepy는 많은 트위터 스트림을 지원합니다. 대부분의 경우에는 filter, user_stream, sitestream 등을 사용하게 됩니다. 더 많은 다른 스트림의 지원 여부에 관한 정보는 `트위터 스트리밍 API 설명서`_.를 참조해주세요. - -이 예제에선 **filter** 를 사용해서 *python* 이라는 단어를 포함하는 모든 트윗을 스트리밍 합니다. **track** 매개변수는 스트림에서 검색할 단어들의 배열입니다. :: - - myStream.filter(track=['python']) - -이 예제는 **filter** 를 사용해서 특정 사용자의 트윗을 스트리밍 하는 방법을 보여줍니다. **follow** 매개변수는 사용자들의 ID의 배열입니다. :: - - myStream.filter(follow=["2211149702"]) - -ID를 찾는 쉬운 방법은 변환 웹사이트를 이용하는 것입니다: 'what is my twitter ID' 를 검색하세요. - -추가적인 조언 -============= - -비동기 스트리밍 ---------------- -스트림은 연결이 끊어지지 않으면 종료되지 않아 스레드가 차단됩니다. Tweepy는 **filter** 에서 편리성을 높여줄 매개변수인 **is_async** 를 제공하여 스트림이 새로운 스레드에서 실행 되도록 합니다. 예시 :: - - myStream.filter(track=['python'], is_async=True) - -오류 처리 ---------- -트위터의 스트리밍 API를 사용할 때에는 속도 제한을 초과할 위험을 고려해야 합니다. 만약 클라이언트가 정해진 시간동안 스트리밍 API에 접근 시도 횟수가 제한된 수를 초과한다면, 420 오류를 수신하게 됩니다. 클라이언트가 420 오류를 수신한 후 기다려야 하는 시간은 접속에 실패할 때마다 기하급수적으로 증가합니다. - -Tweepy의 **Stream Listener** 은 오류 코드를 **on_error** 스텁 메소드로 전송합니다. **on_error** 의 기본 구현은 모든 코드에서 **False** 을 반환하지만, `트위터 스트리밍 API 연결 설명서`_ 에서 권장하는 백오프 전략을 사용하여 어떤, 혹은 모든 코드에서 Tweepy가 다시 연결할 수 있도록 오버라이딩 할 수 있습니다. :: - - class MyStreamListener(tweepy.StreamListener): - - def on_error(self, status_code): - if status_code == 420: - # on_error에서 False를 반환하면 스트림의 연결 차단 - return False - - # Fasle가 아닌 값을 반환하면 백오프 형식으로 스트림에 재연결 - -트위터 API의 더 많은 오류 코드에 대한 정보를 보려면 `트위터 응답 코드 설명서`_. 를 참조하세요. \ No newline at end of file diff --git a/docs/locales/ko_KR/LC_MESSAGES/api.po b/docs/locales/ko_KR/LC_MESSAGES/api.po new file mode 100644 index 0000000..ff73433 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/api.po @@ -0,0 +1,1454 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../api.rst:6 +msgid "API Reference" +msgstr "" + +#: ../../api.rst:8 +msgid "This page contains some basic documentation for the Tweepy module." +msgstr "" + +#: ../../api.rst:12 +msgid ":mod:`tweepy.api` --- Twitter API wrapper" +msgstr "" + +#: ../../api.rst:22 +msgid "" +"This class provides a wrapper for the API as provided by Twitter. The " +"functions provided in this class are listed below." +msgstr "" + +#: ../../api.rst +msgid "Parameters" +msgstr "" + +#: ../../api.rst:25 +msgid "authentication handler to be used" +msgstr "" + +#: ../../api.rst:26 +msgid "general API host" +msgstr "" + +#: ../../api.rst:27 +msgid "search API host" +msgstr "" + +#: ../../api.rst:28 +msgid "cache backend to use" +msgstr "" + +#: ../../api.rst:29 +msgid "general API path root" +msgstr "" + +#: ../../api.rst:30 +msgid "search API path root" +msgstr "" + +#: ../../api.rst:31 +msgid "default number of retries to attempt when error occurs" +msgstr "" + +#: ../../api.rst:32 +msgid "number of seconds to wait between retries" +msgstr "" + +#: ../../api.rst:33 +msgid "which HTTP status codes to retry" +msgstr "" + +#: ../../api.rst:34 +msgid "The maximum amount of time to wait for a response from Twitter" +msgstr "" + +#: ../../api.rst:36 +msgid "The object to use for parsing the response from Twitter" +msgstr "" + +#: ../../api.rst:37 +msgid "Whether or not to use GZIP compression for requests" +msgstr "" + +#: ../../api.rst:38 +msgid "Whether or not to automatically wait for rate limits to replenish" +msgstr "" + +#: ../../api.rst:40 +msgid "" +"Whether or not to print a notification when Tweepy is waiting for rate " +"limits to replenish" +msgstr "" + +#: ../../api.rst:43 +msgid "The full url to an HTTPS proxy to use for connecting to Twitter." +msgstr "" + +#: ../../api.rst:48 +msgid "Timeline methods" +msgstr "" + +#: ../../api.rst:52 +msgid "" +"Returns the 20 most recent statuses, including retweets, posted by the " +"authenticating user and that user's friends. This is the equivalent of " +"/timeline/home on the Web." +msgstr "" + +#: ../../api.rst:56 ../../api.rst:89 ../../api.rst:101 ../../api.rst:112 +#: ../../api.rst:877 +msgid "|since_id|" +msgstr "" + +#: ../../api.rst:57 ../../api.rst:90 ../../api.rst:102 ../../api.rst:113 +#: ../../api.rst:766 ../../api.rst:878 +msgid "|max_id|" +msgstr "" + +#: ../../api.rst:58 ../../api.rst:91 ../../api.rst:103 ../../api.rst:114 +#: ../../api.rst:315 ../../api.rst:330 ../../api.rst:395 ../../api.rst:757 +#: ../../api.rst:848 ../../api.rst:861 ../../api.rst:879 ../../api.rst:1026 +msgid "|count|" +msgstr "" + +#: ../../api.rst:59 ../../api.rst:92 ../../api.rst:104 ../../api.rst:374 +#: ../../api.rst:560 ../../api.rst:611 +msgid "|page|" +msgstr "" + +#: ../../api.rst +msgid "Return type" +msgstr "" + +#: ../../api.rst:60 ../../api.rst:76 ../../api.rst:93 ../../api.rst:105 +#: ../../api.rst:115 ../../api.rst:274 ../../api.rst:561 ../../api.rst:885 +msgid "list of :class:`Status` objects" +msgstr "" + +#: ../../api.rst:66 +msgid "" +"Returns full Tweet objects for up to 100 tweets per request, specified by" +" the ``id_`` parameter." +msgstr "" + +#: ../../api.rst:69 +msgid "A list of Tweet IDs to lookup, up to 100" +msgstr "" + +#: ../../api.rst:70 ../../api.rst:133 ../../api.rst:357 ../../api.rst:502 +#: ../../api.rst:651 ../../api.rst:767 ../../api.rst:880 ../../api.rst:1027 +msgid "|include_entities|" +msgstr "" + +#: ../../api.rst:71 ../../api.rst:128 ../../api.rst:199 +msgid "|trim_user|" +msgstr "" + +#: ../../api.rst:72 +msgid "" +"A boolean indicating whether or not to include tweets that cannot be " +"shown. Defaults to False." +msgstr "" + +#: ../../api.rst:74 ../../api.rst:134 +msgid "|include_ext_alt_text|" +msgstr "" + +#: ../../api.rst:75 ../../api.rst:135 +msgid "|include_card_uri|" +msgstr "" + +#: ../../api.rst:82 +msgid "" +"Returns the 20 most recent statuses posted from the authenticating user " +"or the user specified. It's also possible to request another user's " +"timeline via the id parameter." +msgstr "" + +#: ../../api.rst:86 ../../api.rst:292 ../../api.rst:311 ../../api.rst:326 +#: ../../api.rst:441 ../../api.rst:453 ../../api.rst:476 ../../api.rst:487 +#: ../../api.rst:590 ../../api.rst:601 ../../api.rst:630 ../../api.rst:640 +#: ../../api.rst:672 +msgid "|uid|" +msgstr "" + +#: ../../api.rst:87 ../../api.rst:293 ../../api.rst:312 ../../api.rst:327 +#: ../../api.rst:443 ../../api.rst:455 ../../api.rst:478 ../../api.rst:489 +#: ../../api.rst:592 ../../api.rst:603 ../../api.rst:632 ../../api.rst:642 +#: ../../api.rst:674 ../../api.rst:828 ../../api.rst:843 ../../api.rst:859 +#: ../../api.rst:909 ../../api.rst:941 ../../api.rst:986 ../../api.rst:1040 +msgid "|user_id|" +msgstr "" + +#: ../../api.rst:88 ../../api.rst:294 ../../api.rst:313 ../../api.rst:328 +#: ../../api.rst:442 ../../api.rst:454 ../../api.rst:477 ../../api.rst:488 +#: ../../api.rst:591 ../../api.rst:602 ../../api.rst:631 ../../api.rst:641 +#: ../../api.rst:673 ../../api.rst:827 ../../api.rst:842 ../../api.rst:858 +#: ../../api.rst:908 ../../api.rst:940 ../../api.rst:985 ../../api.rst:1039 +msgid "|screen_name|" +msgstr "" + +#: ../../api.rst:98 +msgid "" +"Returns the 20 most recent tweets of the authenticated user that have " +"been retweeted by others." +msgstr "" + +#: ../../api.rst:110 +msgid "Returns the 20 most recent mentions, including retweets." +msgstr "" + +#: ../../api.rst:119 +msgid "Status methods" +msgstr "" + +#: ../../api.rst:125 +msgid "Returns a single status specified by the ID parameter." +msgstr "" + +#: ../../api.rst:127 ../../api.rst:245 ../../api.rst:253 ../../api.rst:262 +#: ../../api.rst:272 ../../api.rst:281 ../../api.rst:569 ../../api.rst:578 +msgid "|sid|" +msgstr "" + +#: ../../api.rst:129 +msgid "" +"A boolean indicating if any Tweets returned that have been retweeted by " +"the authenticating user should include an additional current_user_retweet" +" node, containing the ID of the source status for the retweet." +msgstr "" + +#: ../../api.rst:136 ../../api.rst:209 ../../api.rst:237 ../../api.rst:246 +#: ../../api.rst:254 ../../api.rst:282 ../../api.rst:570 ../../api.rst:579 +msgid ":class:`Status` object" +msgstr "" + +#: ../../api.rst:147 +msgid "Updates the authenticating user's current status, also known as Tweeting." +msgstr "" + +#: ../../api.rst:149 +msgid "" +"For each update attempt, the update text is compared with the " +"authenticating user's recent Tweets. Any attempt that would result in " +"duplication will be blocked, resulting in a 403 error. A user cannot " +"submit the same status twice in a row." +msgstr "" + +#: ../../api.rst:154 +msgid "" +"While not rate limited by the API, a user is limited in the number of " +"Tweets they can create at a time. If the number of updates posted by the " +"user reaches the current allowed limit this method will return an HTTP " +"403 error." +msgstr "" + +#: ../../api.rst:158 ../../api.rst:223 +msgid "The text of your status update." +msgstr "" + +#: ../../api.rst:159 +msgid "" +"The ID of an existing status that the update is in reply to. Note: This " +"parameter will be ignored unless the author of the Tweet this parameter " +"references is mentioned within the status text. Therefore, you must " +"include @username, where username is the author of the referenced Tweet, " +"within the update." +msgstr "" + +#: ../../api.rst:164 +msgid "" +"If set to true and used with in_reply_to_status_id, leading @mentions " +"will be looked up from the original Tweet, and added to the new Tweet " +"from there. This wil append @mentions into the metadata of an extended " +"Tweet as a reply chain grows, until the limit on @mentions is reached. In" +" cases where the original Tweet has been deleted, the reply will fail." +msgstr "" + +#: ../../api.rst:170 +msgid "" +"When used with auto_populate_reply_metadata, a comma-separated list of " +"user ids which will be removed from the server-generated @mentions prefix" +" on an extended Tweet. Note that the leading @mention cannot be removed " +"as it would break the in-reply-to-status-id semantics. Attempting to " +"remove it will be silently ignored." +msgstr "" + +#: ../../api.rst:176 +msgid "" +"In order for a URL to not be counted in the status body of an extended " +"Tweet, provide a URL as a Tweet attachment. This URL must be a Tweet " +"permalink, or Direct Message deep link. Arbitrary, non-Twitter URLs must " +"remain in the status text. URLs passed to the attachment_url parameter " +"not matching either a Tweet permalink or Direct Message deep link will " +"fail at Tweet creation and cause an exception." +msgstr "" + +#: ../../api.rst:182 +msgid "" +"A list of media_ids to associate with the Tweet. You may include up to 4 " +"photos or 1 animated GIF or 1 video in a Tweet." +msgstr "" + +#: ../../api.rst:184 +msgid "" +"If you upload Tweet media that might be considered sensitive content such" +" as nudity, or medical procedures, you must set this value to true." +msgstr "" + +#: ../../api.rst:187 +msgid "" +"The latitude of the location this Tweet refers to. This parameter will be" +" ignored unless it is inside the range -90.0 to +90.0 (North is positive)" +" inclusive. It will also be ignored if there is no corresponding long " +"parameter." +msgstr "" + +#: ../../api.rst:191 +msgid "" +"The longitude of the location this Tweet refers to. The valid ranges for " +"longitude are -180.0 to +180.0 (East is positive) inclusive. This " +"parameter will be ignored if outside that range, if it is not a number, " +"if geo_enabled is disabled, or if there no corresponding lat parameter." +msgstr "" + +#: ../../api.rst:196 +msgid "A place in the world." +msgstr "" + +#: ../../api.rst:197 +msgid "" +"Whether or not to put a pin on the exact coordinates a Tweet has been " +"sent from." +msgstr "" + +#: ../../api.rst:200 +msgid "" +"When set to true, enables shortcode commands for sending Direct Messages " +"as part of the status text to send a Direct Message to a user. When set " +"to false, disables this behavior and includes any leading characters in " +"the status text that is posted" +msgstr "" + +#: ../../api.rst:204 +msgid "" +"When set to true, causes any status text that starts with shortcode " +"commands to return an API error. When set to false, allows shortcode " +"commands to be sent in the status text and acted on by the API." +msgstr "" + +#: ../../api.rst:207 +msgid "" +"Associate an ads card with the Tweet using the card_uri value from any " +"ads card response." +msgstr "" + +#: ../../api.rst:217 +msgid "" +"*Deprecated*: Use :func:`API.media_upload` instead. Update the " +"authenticated user's status. Statuses that are duplicates or too long " +"will be silently ignored." +msgstr "" + +#: ../../api.rst:221 +msgid "" +"The filename of the image to upload. This will automatically be opened " +"unless `file` is specified" +msgstr "" + +#: ../../api.rst:224 +msgid "The ID of an existing status that the update is in reply to." +msgstr "" + +#: ../../api.rst:226 +msgid "Whether to automatically include the @mentions in the status metadata." +msgstr "" + +#: ../../api.rst:228 +msgid "The location's latitude that this tweet refers to." +msgstr "" + +#: ../../api.rst:229 +msgid "The location's longitude that this tweet refers to." +msgstr "" + +#: ../../api.rst:230 +msgid "" +"Source of the update. Only supported by Identi.ca. Twitter ignores this " +"parameter." +msgstr "" + +#: ../../api.rst:232 +msgid "" +"Twitter ID of location which is listed in the Tweet if geolocation is " +"enabled for the user." +msgstr "" + +#: ../../api.rst:234 +msgid "" +"A file object, which will be used instead of opening `filename`. " +"`filename` is still required, for MIME type detection and to use as a " +"form field in the POST data" +msgstr "" + +#: ../../api.rst:242 +msgid "" +"Destroy the status specified by the id parameter. The authenticated user " +"must be the author of the status to destroy." +msgstr "" + +#: ../../api.rst:251 +msgid "Retweets a tweet. Requires the id of the tweet you are retweeting." +msgstr "" + +#: ../../api.rst:259 +msgid "" +"Returns up to 100 user IDs belonging to users who have retweeted the " +"Tweet specified by the id parameter." +msgstr "" + +#: ../../api.rst:263 ../../api.rst:314 ../../api.rst:329 ../../api.rst:396 +#: ../../api.rst:479 ../../api.rst:490 ../../api.rst:619 ../../api.rst:650 +#: ../../api.rst:660 ../../api.rst:847 ../../api.rst:860 ../../api.rst:974 +#: ../../api.rst:1025 +msgid "|cursor|" +msgstr "" + +#: ../../api.rst:264 +msgid "Have ids returned as strings instead." +msgstr "" + +#: ../../api.rst:270 +msgid "Returns up to 100 of the first retweets of the given tweet." +msgstr "" + +#: ../../api.rst:273 +msgid "Specifies the number of retweets to retrieve." +msgstr "" + +#: ../../api.rst:279 +msgid "Untweets a retweeted status. Requires the id of the retweet to unretweet." +msgstr "" + +#: ../../api.rst:286 +msgid "User methods" +msgstr "" + +#: ../../api.rst:290 +msgid "Returns information about the specified user." +msgstr "" + +#: ../../api.rst:295 ../../api.rst:302 ../../api.rst:446 ../../api.rst:456 +#: ../../api.rst:526 ../../api.rst:535 ../../api.rst:548 ../../api.rst:593 +#: ../../api.rst:604 ../../api.rst:633 ../../api.rst:643 ../../api.rst:677 +msgid ":class:`User` object" +msgstr "" + +#: ../../api.rst:300 +msgid "Returns the authenticated user's information." +msgstr "" + +#: ../../api.rst:308 +msgid "" +"Returns an user's friends ordered in which they were added 100 at a time." +" If no user is specified it defaults to the authenticated user." +msgstr "" + +#: ../../api.rst:316 ../../api.rst:331 ../../api.rst:503 ../../api.rst:652 +#: ../../api.rst:1028 +msgid "|skip_status|" +msgstr "" + +#: ../../api.rst:317 ../../api.rst:332 +msgid "|include_user_entities|" +msgstr "" + +#: ../../api.rst:318 ../../api.rst:333 ../../api.rst:361 ../../api.rst:375 +#: ../../api.rst:612 ../../api.rst:653 ../../api.rst:975 ../../api.rst:1029 +msgid "list of :class:`User` objects" +msgstr "" + +#: ../../api.rst:323 +msgid "" +"Returns a user's followers ordered in which they were added. If no user " +"is specified by id/screen name, it defaults to the authenticated user." +msgstr "" + +#: ../../api.rst:339 +msgid "Returns fully-hydrated user objects for up to 100 users per request." +msgstr "" + +#: ../../api.rst:341 +msgid "There are a few things to note when using this method." +msgstr "" + +#: ../../api.rst:343 +msgid "" +"You must be following a protected user to be able to see their most " +"recent status update. If you don't follow a protected user their status " +"will be removed." +msgstr "" + +#: ../../api.rst:346 +msgid "" +"The order of user IDs or screen names may not match the order of users in" +" the returned array." +msgstr "" + +#: ../../api.rst:348 +msgid "" +"If a requested user is unknown, suspended, or deleted, then that user " +"will not be returned in the results list." +msgstr "" + +#: ../../api.rst:350 +msgid "" +"If none of your lookup criteria can be satisfied by returning a user " +"object, a HTTP 404 will be thrown." +msgstr "" + +#: ../../api.rst:353 +msgid "A list of user IDs, up to 100 are allowed in a single request." +msgstr "" + +#: ../../api.rst:355 +msgid "A list of screen names, up to 100 are allowed in a single request." +msgstr "" + +#: ../../api.rst:358 +msgid "" +"Valid request values are compat and extended, which give compatibility " +"mode and extended mode, respectively for Tweets that contain over 140 " +"characters." +msgstr "" + +#: ../../api.rst:366 +msgid "" +"Run a search for users similar to Find People button on Twitter.com; the " +"same results returned by people search on Twitter.com will be returned by" +" using this API (about being listed in the People Search). It is only " +"possible to retrieve the first 1000 matches from this API." +msgstr "" + +#: ../../api.rst:371 +msgid "The query to run against people search." +msgstr "" + +#: ../../api.rst:372 +msgid "Specifies the number of statuses to retrieve. May not be greater than 20." +msgstr "" + +#: ../../api.rst:379 +msgid "Direct Message Methods" +msgstr "" + +#: ../../api.rst:383 +msgid "Returns a specific direct message." +msgstr "" + +#: ../../api.rst:385 +msgid "|id|" +msgstr "" + +#: ../../api.rst:386 +msgid "|full_text|" +msgstr "" + +#: ../../api.rst:387 ../../api.rst:419 +msgid ":class:`DirectMessage` object" +msgstr "" + +#: ../../api.rst:392 +msgid "" +"Returns all Direct Message events (both sent and received) within the " +"last 30 days. Sorted in reverse-chronological order." +msgstr "" + +#: ../../api.rst:397 +msgid "list of :class:`DirectMessage` objects" +msgstr "" + +#: ../../api.rst:403 +msgid "" +"Sends a new direct message to the specified user from the authenticating " +"user." +msgstr "" + +#: ../../api.rst:406 +msgid "The ID of the user who should receive the direct message." +msgstr "" + +#: ../../api.rst:408 +msgid "The text of your Direct Message. Max length of 10,000 characters." +msgstr "" + +#: ../../api.rst:410 +msgid "" +"The Quick Reply type to present to the user: * options - Array of " +"Options objects (20 max). * text_input - Text Input object. * location - " +"Location object." +msgstr "" + +#: ../../api.rst:410 +msgid "The Quick Reply type to present to the user:" +msgstr "" + +#: ../../api.rst:412 +msgid "options - Array of Options objects (20 max)." +msgstr "" + +#: ../../api.rst:413 +msgid "text_input - Text Input object." +msgstr "" + +#: ../../api.rst:414 +msgid "location - Location object." +msgstr "" + +#: ../../api.rst:415 +msgid "The attachment type. Can be media or location." +msgstr "" + +#: ../../api.rst:416 +msgid "" +"A media id to associate with the message. A Direct Message may only " +"reference a single media_id." +msgstr "" + +#: ../../api.rst:424 +msgid "" +"Deletes the direct message specified in the required ID parameter. The " +"authenticating user must be the recipient of the specified direct " +"message. Direct Messages are only removed from the interface of the user " +"context provided. Other members of the conversation can still access the " +"Direct Messages." +msgstr "" + +#: ../../api.rst:430 +msgid "The id of the Direct Message that should be deleted." +msgstr "" + +#: ../../api.rst:435 +msgid "Friendship Methods" +msgstr "" + +#: ../../api.rst:439 +msgid "Create a new friendship with the specified user (aka follow)." +msgstr "" + +#: ../../api.rst:444 +msgid "Enable notifications for the target user in addition to becoming friends." +msgstr "" + +#: ../../api.rst:451 +msgid "Destroy a friendship with the specified user (aka unfollow)." +msgstr "" + +#: ../../api.rst:462 +msgid "Returns detailed information about the relationship between two users." +msgstr "" + +#: ../../api.rst:464 +msgid "The user_id of the subject user." +msgstr "" + +#: ../../api.rst:465 +msgid "The screen_name of the subject user." +msgstr "" + +#: ../../api.rst:466 +msgid "The user_id of the target user." +msgstr "" + +#: ../../api.rst:467 +msgid "The screen_name of the target user." +msgstr "" + +#: ../../api.rst:468 +msgid ":class:`Friendship` object" +msgstr "" + +#: ../../api.rst:473 +msgid "" +"Returns an array containing the IDs of users being followed by the " +"specified user." +msgstr "" + +#: ../../api.rst:485 +msgid "Returns an array containing the IDs of users following the specified user." +msgstr "" + +#: ../../api.rst:495 +msgid "Account Methods" +msgstr "" + +#: ../../api.rst:500 +msgid "Verify the supplied user credentials are valid." +msgstr "" + +#: ../../api.rst:504 +msgid "When set to true email will be returned in the user objects as a string." +msgstr "" + +#: ../../api.rst:506 +msgid ":class:`User` object if credentials are valid, otherwise False" +msgstr "" + +#: ../../api.rst:511 +msgid "" +"Returns the current rate limits for methods belonging to the specified " +"resource families. When using application-only auth, this method's " +"response indicates the application-only auth rate limiting context." +msgstr "" + +#: ../../api.rst:515 +msgid "" +"A comma-separated list of resource families you want to know the current " +"rate limit disposition for." +msgstr "" + +#: ../../api.rst:517 ../../api.rst:1056 ../../api.rst:1080 ../../api.rst:1102 +msgid ":class:`JSON` object" +msgstr "" + +#: ../../api.rst:522 +msgid "" +"Update the authenticating user's profile image. Valid formats: GIF, JPG, " +"or PNG" +msgstr "" + +#: ../../api.rst:525 ../../api.rst:534 +msgid "local path to image file to upload. Not a remote URL!" +msgstr "" + +#: ../../api.rst:531 +msgid "" +"Update authenticating user's background image. Valid formats: GIF, JPG, " +"or PNG" +msgstr "" + +#: ../../api.rst:540 +msgid "" +"Sets values that users are able to set under the \"Account\" tab of their" +" settings page." +msgstr "" + +#: ../../api.rst:543 +msgid "Maximum of 20 characters" +msgstr "" + +#: ../../api.rst:544 +msgid "" +"Maximum of 100 characters. Will be prepended with \"http://\" if not " +"present" +msgstr "" + +#: ../../api.rst:546 +msgid "Maximum of 30 characters" +msgstr "" + +#: ../../api.rst:547 +msgid "Maximum of 160 characters" +msgstr "" + +#: ../../api.rst:552 +msgid "Favorite Methods" +msgstr "" + +#: ../../api.rst:556 +msgid "" +"Returns the favorite statuses for the authenticating user or user " +"specified by the ID parameter." +msgstr "" + +#: ../../api.rst:559 +msgid "The ID or screen name of the user to request favorites" +msgstr "" + +#: ../../api.rst:566 +msgid "" +"Favorites the status specified in the ID parameter as the authenticating " +"user." +msgstr "" + +#: ../../api.rst:575 +msgid "" +"Un-favorites the status specified in the ID parameter as the " +"authenticating user." +msgstr "" + +#: ../../api.rst:583 +msgid "Block Methods" +msgstr "" + +#: ../../api.rst:587 +msgid "" +"Blocks the user specified in the ID parameter as the authenticating user." +" Destroys a friendship to the blocked user if it exists." +msgstr "" + +#: ../../api.rst:598 +msgid "" +"Un-blocks the user specified in the ID parameter for the authenticating " +"user." +msgstr "" + +#: ../../api.rst:609 +msgid "Returns an array of user objects that the authenticating user is blocking." +msgstr "" + +#: ../../api.rst:617 +msgid "Returns an array of numeric user ids the authenticating user is blocking." +msgstr "" + +#: ../../api.rst:624 +msgid "Mute Methods" +msgstr "" + +#: ../../api.rst:628 +msgid "Mutes the user specified in the ID parameter for the authenticating user." +msgstr "" + +#: ../../api.rst:638 +msgid "" +"Un-mutes the user specified in the ID parameter for the authenticating " +"user." +msgstr "" + +#: ../../api.rst:648 +msgid "Returns an array of user objects the authenticating user has muted." +msgstr "" + +#: ../../api.rst:658 +msgid "Returns an array of numeric user ids the authenticating user has muted." +msgstr "" + +#: ../../api.rst:665 +msgid "Spam Reporting Methods" +msgstr "" + +#: ../../api.rst:669 +msgid "" +"The user specified in the id is blocked by the authenticated user and " +"reported as a spammer." +msgstr "" + +#: ../../api.rst:675 +msgid "" +"A boolean indicating if the reported account should be blocked. Defaults " +"to True." +msgstr "" + +#: ../../api.rst:681 +msgid "Saved Searches Methods" +msgstr "" + +#: ../../api.rst:685 +msgid "Returns the authenticated user's saved search queries." +msgstr "" + +#: ../../api.rst:687 +msgid "list of :class:`SavedSearch` objects" +msgstr "" + +#: ../../api.rst:692 +msgid "" +"Retrieve the data for a saved search owned by the authenticating user " +"specified by the given id." +msgstr "" + +#: ../../api.rst:695 +msgid "The id of the saved search to be retrieved." +msgstr "" + +#: ../../api.rst:696 ../../api.rst:704 ../../api.rst:713 +msgid ":class:`SavedSearch` object" +msgstr "" + +#: ../../api.rst:701 +msgid "Creates a saved search for the authenticated user." +msgstr "" + +#: ../../api.rst:703 +msgid "The query of the search the user would like to save." +msgstr "" + +#: ../../api.rst:709 +msgid "" +"Destroys a saved search for the authenticated user. The search specified " +"by id must be owned by the authenticating user." +msgstr "" + +#: ../../api.rst:712 +msgid "The id of the saved search to be deleted." +msgstr "" + +#: ../../api.rst:717 +msgid "Help Methods" +msgstr "" + +#: ../../api.rst:723 +msgid "Returns a collection of relevant Tweets matching a specified query." +msgstr "" + +#: ../../api.rst:725 +msgid "" +"Please note that Twitter's search service and, by extension, the Search " +"API is not meant to be an exhaustive source of Tweets. Not all Tweets " +"will be indexed or made available via the search interface." +msgstr "" + +#: ../../api.rst:729 +msgid "" +"In API v1.1, the response format of the Search API has been improved to " +"return Tweet objects more similar to the objects you’ll find across the " +"REST API and platform. However, perspectival attributes (fields that " +"pertain to the perspective of the authenticating user) are not currently " +"supported on this endpoint.\\ [#]_\\ [#]_" +msgstr "" + +#: ../../api.rst:735 +msgid "" +"the search query string of 500 characters maximum, including operators. " +"Queries may additionally be limited by complexity." +msgstr "" + +#: ../../api.rst:737 +msgid "" +"Returns tweets by users located within a given radius of the given " +"latitude/longitude. The location is preferentially taking from the " +"Geotagging API, but will fall back to their Twitter profile. The " +"parameter value is specified by \"latitide,longitude,radius\", where " +"radius units must be specified as either \"mi\" (miles) or \"km\" " +"(kilometers). Note that you cannot use the near operator via the API to " +"geocode arbitrary locations; however you can use this geocode parameter " +"to search near geocodes directly. A maximum of 1,000 distinct \"sub-" +"regions\" will be considered when using the radius modifier." +msgstr "" + +#: ../../api.rst:746 +msgid "" +"Restricts tweets to the given language, given by an ISO 639-1 code. " +"Language detection is best-effort." +msgstr "" + +#: ../../api.rst:748 +msgid "" +"Specify the language of the query you are sending (only ja is currently " +"effective). This is intended for language-specific consumers and the " +"default should work in the majority of cases." +msgstr "" + +#: ../../api.rst:751 +msgid "" +"Specifies what type of search results you would prefer to receive. The " +"current default is \"mixed.\" Valid values include: * mixed : include " +"both popular and real time results in the response * recent : return only" +" the most recent results in the response * popular : return only the most" +" popular results in the response" +msgstr "" + +#: ../../api.rst:751 +msgid "" +"Specifies what type of search results you would prefer to receive. The " +"current default is \"mixed.\" Valid values include:" +msgstr "" + +#: ../../api.rst:754 +msgid "mixed : include both popular and real time results in the response" +msgstr "" + +#: ../../api.rst:755 +msgid "recent : return only the most recent results in the response" +msgstr "" + +#: ../../api.rst:756 +msgid "popular : return only the most popular results in the response" +msgstr "" + +#: ../../api.rst:758 +msgid "" +"Returns tweets created before the given date. Date should be formatted as" +" YYYY-MM-DD. Keep in mind that the search index has a 7-day limit. In " +"other words, no tweets will be found for a date older than one week." +msgstr "" + +#: ../../api.rst:762 +msgid "" +"|since_id| There are limits to the number of Tweets which can be accessed" +" through the API. If the limit of Tweets has occurred since the since_id," +" the since_id will be forced to the oldest ID available." +msgstr "" + +#: ../../api.rst:768 +msgid ":class:`SearchResults` object" +msgstr "" + +#: ../../api.rst:772 +msgid "List Methods" +msgstr "" + +#: ../../api.rst:776 +msgid "" +"Creates a new list for the authenticated user. Note that you can create " +"up to 1000 lists per account." +msgstr "" + +#: ../../api.rst:779 +msgid "The name of the new list." +msgstr "" + +#: ../../api.rst:780 ../../api.rst:806 +msgid "|list_mode|" +msgstr "" + +#: ../../api.rst:781 +msgid "The description of the list you are creating." +msgstr "" + +#: ../../api.rst:782 ../../api.rst:794 ../../api.rst:810 ../../api.rst:897 +#: ../../api.rst:912 ../../api.rst:929 ../../api.rst:944 ../../api.rst:962 +#: ../../api.rst:1000 ../../api.rst:1011 +msgid ":class:`List` object" +msgstr "" + +#: ../../api.rst:787 +msgid "" +"Deletes the specified list. The authenticated user must own the list to " +"be able to destroy it." +msgstr "" + +#: ../../api.rst:790 ../../api.rst:808 ../../api.rst:876 ../../api.rst:896 +#: ../../api.rst:911 ../../api.rst:928 ../../api.rst:943 ../../api.rst:961 +#: ../../api.rst:973 ../../api.rst:988 ../../api.rst:999 ../../api.rst:1010 +#: ../../api.rst:1024 ../../api.rst:1042 +msgid "|owner_screen_name|" +msgstr "" + +#: ../../api.rst:791 ../../api.rst:809 ../../api.rst:875 ../../api.rst:895 +#: ../../api.rst:910 ../../api.rst:927 ../../api.rst:942 ../../api.rst:960 +#: ../../api.rst:972 ../../api.rst:987 ../../api.rst:998 ../../api.rst:1009 +#: ../../api.rst:1023 ../../api.rst:1041 +msgid "|owner_id|" +msgstr "" + +#: ../../api.rst:792 ../../api.rst:803 ../../api.rst:873 ../../api.rst:893 +#: ../../api.rst:906 ../../api.rst:921 ../../api.rst:938 ../../api.rst:954 +#: ../../api.rst:970 ../../api.rst:983 ../../api.rst:996 ../../api.rst:1007 +#: ../../api.rst:1021 ../../api.rst:1037 +msgid "|list_id|" +msgstr "" + +#: ../../api.rst:793 ../../api.rst:804 ../../api.rst:874 ../../api.rst:894 +#: ../../api.rst:907 ../../api.rst:922 ../../api.rst:939 ../../api.rst:955 +#: ../../api.rst:971 ../../api.rst:984 ../../api.rst:997 ../../api.rst:1008 +#: ../../api.rst:1022 ../../api.rst:1038 +msgid "|slug|" +msgstr "" + +#: ../../api.rst:800 +msgid "" +"Updates the specified list. The authenticated user must own the list to " +"be able to update it." +msgstr "" + +#: ../../api.rst:805 +msgid "The name for the list." +msgstr "" + +#: ../../api.rst:807 +msgid "The description to give the list." +msgstr "" + +#: ../../api.rst:815 +msgid "" +"Returns all lists the authenticating or specified user subscribes to, " +"including their own. The user is specified using the ``user_id`` or " +"``screen_name`` parameters. If no user is given, the authenticating user " +"is used." +msgstr "" + +#: ../../api.rst:820 +msgid "" +"A maximum of 100 results will be returned by this call. Subscribed lists " +"are returned first, followed by owned lists. This means that if a user " +"subscribes to 90 lists and owns 20 lists, this method returns 90 " +"subscriptions and 10 owned lists. The ``reverse`` method returns owned " +"lists first, so with ``reverse=true``, 20 owned lists and 80 " +"subscriptions would be returned." +msgstr "" + +#: ../../api.rst:829 +msgid "" +"A boolean indicating if you would like owned lists to be returned first. " +"See description above for information on how this parameter works." +msgstr "" + +#: ../../api.rst:832 ../../api.rst:849 ../../api.rst:862 +msgid "list of :class:`List` objects" +msgstr "" + +#: ../../api.rst:838 +msgid "" +"Returns the lists the specified user has been added to. If ``user_id`` or" +" ``screen_name`` are not provided, the memberships for the authenticating" +" user are returned." +msgstr "" + +#: ../../api.rst:844 +msgid "" +"A boolean indicating whether to return just lists the authenticating user" +" owns, and the user represented by ``user_id`` or ``screen_name`` is a " +"member of." +msgstr "" + +#: ../../api.rst:855 +msgid "" +"Obtain a collection of the lists the specified user is subscribed to, 20 " +"lists per page by default. Does not include the user's own lists." +msgstr "" + +#: ../../api.rst:869 +msgid "" +"Returns a timeline of tweets authored by members of the specified list. " +"Retweets are included by default. Use the ``include_rts=false`` parameter" +" to omit retweets." +msgstr "" + +#: ../../api.rst:881 +msgid "" +"A boolean indicating whether the list timeline will contain native " +"retweets (if they exist) in addition to the standard stream of tweets. " +"The output format of retweeted tweets is identical to the representation " +"you see in home_timeline." +msgstr "" + +#: ../../api.rst:890 +msgid "" +"Returns the specified list. Private lists will only be shown if the " +"authenticated user owns the specified list." +msgstr "" + +#: ../../api.rst:903 +msgid "" +"Add a member to a list. The authenticated user must own the list to be " +"able to add members to it. Lists are limited to 5,000 members." +msgstr "" + +#: ../../api.rst:918 +msgid "" +"Add up to 100 members to a list. The authenticated user must own the list" +" to be able to add members to it. Lists are limited to 5,000 members." +msgstr "" + +#: ../../api.rst:923 ../../api.rst:956 +msgid "" +"A comma separated list of screen names, up to 100 are allowed in a single" +" request" +msgstr "" + +#: ../../api.rst:925 ../../api.rst:958 +msgid "" +"A comma separated list of user IDs, up to 100 are allowed in a single " +"request" +msgstr "" + +#: ../../api.rst:935 +msgid "" +"Removes the specified member from the list. The authenticated user must " +"be the list's owner to remove members from the list." +msgstr "" + +#: ../../api.rst:950 +msgid "" +"Remove up to 100 members from a list. The authenticated user must own the" +" list to be able to remove members from it. Lists are limited to 5,000 " +"members." +msgstr "" + +#: ../../api.rst:968 +msgid "Returns the members of the specified list." +msgstr "" + +#: ../../api.rst:981 +msgid "Check if the specified user is a member of the specified list." +msgstr "" + +#: ../../api.rst:989 +msgid ":class:`User` object if user is a member of list" +msgstr "" + +#: ../../api.rst:994 +msgid "Subscribes the authenticated user to the specified list." +msgstr "" + +#: ../../api.rst:1005 +msgid "Unsubscribes the authenticated user from the specified list." +msgstr "" + +#: ../../api.rst:1018 +msgid "" +"Returns the subscribers of the specified list. Private list subscribers " +"will only be shown if the authenticated user owns the specified list." +msgstr "" + +#: ../../api.rst:1035 +msgid "Check if the specified user is a subscriber of the specified list." +msgstr "" + +#: ../../api.rst:1043 +msgid ":class:`User` object if user is subscribed to list" +msgstr "" + +#: ../../api.rst:1047 +msgid "Trends Methods" +msgstr "" + +#: ../../api.rst:1051 +msgid "" +"Returns the locations that Twitter has trending topic information for. " +"The response is an array of \"locations\" that encode the location's " +"WOEID (a Yahoo! Where On Earth ID) and some other human-readable " +"information such as a canonical name and country the location belongs in." +msgstr "" + +#: ../../api.rst:1061 +msgid "" +"Returns the top 50 trending topics for a specific WOEID, if trending " +"information is available for it." +msgstr "" + +#: ../../api.rst:1064 +msgid "" +"The response is an array of “trend” objects that encode the name of the " +"trending topic, the query parameter that can be used to search for the " +"topic on Twitter Search, and the Twitter Search URL." +msgstr "" + +#: ../../api.rst:1068 +msgid "" +"This information is cached for 5 minutes. Requesting more frequently than" +" that will not return any more data, and will count against your rate " +"limit usage." +msgstr "" + +#: ../../api.rst:1072 +msgid "" +"The tweet_volume for the last 24 hours is also returned for many trends " +"if this is available." +msgstr "" + +#: ../../api.rst:1075 +msgid "" +"The Yahoo! Where On Earth ID of the location to return trending " +"information for. Global information is available by using 1 as the WOEID." +msgstr "" + +#: ../../api.rst:1078 +msgid "" +"Setting this equal to hashtags will remove all hashtags from the trends " +"list." +msgstr "" + +#: ../../api.rst:1085 +msgid "" +"Returns the locations that Twitter has trending topic information for, " +"closest to a specified location." +msgstr "" + +#: ../../api.rst:1088 +msgid "" +"The response is an array of “locations” that encode the location’s WOEID " +"and some other human-readable information such as a canonical name and " +"country the location belongs in." +msgstr "" + +#: ../../api.rst:1092 +msgid "A WOEID is a Yahoo! Where On Earth ID." +msgstr "" + +#: ../../api.rst:1094 +msgid "" +"If provided with a long parameter the available trend locations will be " +"sorted by distance, nearest to furthest, to the co-ordinate pair. The " +"valid ranges for longitude is -180.0 to +180.0 (West is negative, East is" +" positive) inclusive." +msgstr "" + +#: ../../api.rst:1098 +msgid "" +"If provided with a lat parameter the available trend locations will be " +"sorted by distance, nearest to furthest, to the co-ordinate pair. The " +"valid ranges for longitude is -180.0 to +180.0 (West is negative, East is" +" positive) inclusive." +msgstr "" + +#: ../../api.rst:1106 +msgid "Geo Methods" +msgstr "" + +#: ../../api.rst:1111 +msgid "" +"Given a latitude and longitude, looks for places (cities and " +"neighbourhoods) whose IDs can be specified in a call to " +":func:`update_status` to appear as the name of the location. This call " +"provides a detailed response about the location in question; the " +":func:`nearby_places` function should be preferred for getting a list of " +"places nearby without great detail." +msgstr "" + +#: ../../api.rst:1117 +msgid "The location's latitude." +msgstr "" + +#: ../../api.rst:1118 +msgid "The location's longitude." +msgstr "" + +#: ../../api.rst:1119 +msgid "" +"Specify the \"region\" in which to search, such as a number (then this is" +" a radius in meters, but it can also take a string that is suffixed with " +"ft to specify feet). If this is not passed in, then it is assumed to be " +"0m" +msgstr "" + +#: ../../api.rst:1123 +msgid "Assumed to be `neighborhood' by default; can also be `city'." +msgstr "" + +#: ../../api.rst:1125 +msgid "" +"A hint as to the maximum number of results to return. This is only a " +"guideline, which may not be adhered to." +msgstr "" + +#: ../../api.rst:1131 +msgid "Given *id* of a place, provide more details about that place." +msgstr "" + +#: ../../api.rst:1133 +msgid "Valid Twitter ID of a location." +msgstr "" + +#: ../../api.rst:1137 +msgid "Utility methods" +msgstr "" + +#: ../../api.rst:1141 +msgid "" +"Returns the current configuration used by Twitter including twitter.com " +"slugs which are not usernames, maximum photo resolutions, and t.co " +"shortened URL length. It is recommended applications request this " +"endpoint when they are loaded, but no more than once a day." +msgstr "" + +#: ../../api.rst:1148 +msgid "Media methods" +msgstr "" + +#: ../../api.rst:1152 +msgid "Use this endpoint to upload images to Twitter." +msgstr "" + +#: ../../api.rst:1154 +msgid "" +"The filename of the image to upload. This will automatically be opened " +"unless ``file`` is specified." +msgstr "" + +#: ../../api.rst:1156 +msgid "" +"A file object, which will be used instead of opening ``filename``. " +"``filename`` is still required, for MIME type detection and to use as a " +"form field in the POST data." +msgstr "" + +#: ../../api.rst:1159 +msgid ":class:`Media` object" +msgstr "" + +#: ../../api.rst:1164 +msgid "" +"This endpoint can be used to provide additional information about the " +"uploaded media_id. This feature is currently only supported for images " +"and GIFs. Call this endpoint to attach additional metadata such as image " +"alt text." +msgstr "" + +#: ../../api.rst:1169 +msgid "The ID of the media to add alt text to." +msgstr "" + +#: ../../api.rst:1170 +msgid "The alt text to add to the image." +msgstr "" + +#: ../../api.rst:1174 +msgid ":mod:`tweepy.error` --- Exceptions" +msgstr "" + +#: ../../api.rst:1176 +msgid "" +"The exceptions are available in the ``tweepy`` module directly, which " +"means ``tweepy.error`` itself does not need to be imported. For example, " +"``tweepy.error.TweepError`` is available as ``tweepy.TweepError``." +msgstr "" + +#: ../../api.rst:1183 +msgid "The main exception Tweepy uses. Is raised for a number of things." +msgstr "" + +#: ../../api.rst:1185 +msgid "" +"When a ``TweepError`` is raised due to an error Twitter responded with, " +"the error code (`as described in the API documentation " +"`_) can be " +"accessed at ``TweepError.response.text``. Note, however, that " +"``TweepError``\\ s also may be raised with other things as message (for " +"example plain error reason strings)." +msgstr "" + +#: ../../api.rst:1195 +msgid "" +"Is raised when an API method fails due to hitting Twitter's rate limit. " +"Makes for easy handling of the rate limit specifically." +msgstr "" + +#: ../../api.rst:1198 +msgid "" +"Inherits from :exc:`TweepError`, so ``except TweepError`` will catch a " +"``RateLimitError`` too." +msgstr "" + +#: ../../api.rst:1203 +msgid "Footnotes" +msgstr "" + +#: ../../api.rst:1204 +msgid "https://web.archive.org/web/20170829051949/https://dev.twitter.com/rest/reference/get/search/tweets" +msgstr "" + +#: ../../api.rst:1205 +msgid "" +"https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-" +"is-already-favorited-by-the-user/11145" +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/auth_tutorial.po b/docs/locales/ko_KR/LC_MESSAGES/auth_tutorial.po new file mode 100644 index 0000000..575b959 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/auth_tutorial.po @@ -0,0 +1,177 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../auth_tutorial.rst:6 +msgid "Authentication Tutorial" +msgstr "" + +#: ../../auth_tutorial.rst:9 +msgid "Introduction" +msgstr "" + +#: ../../auth_tutorial.rst:11 +msgid "" +"Tweepy supports both OAuth 1a (application-user) and OAuth 2 " +"(application-only) authentication. Authentication is handled by the " +"tweepy.AuthHandler class." +msgstr "" + +#: ../../auth_tutorial.rst:16 +msgid "OAuth 1a Authentication" +msgstr "" + +#: ../../auth_tutorial.rst:18 +msgid "" +"Tweepy tries to make OAuth 1a as painless as possible for you. To begin " +"the process we need to register our client application with Twitter. " +"Create a new application and once you are done you should have your " +"consumer key and secret. Keep these two handy, you'll need them." +msgstr "" + +#: ../../auth_tutorial.rst:24 +msgid "" +"The next step is creating an OAuthHandler instance. Into this we pass our" +" consumer key and secret which was given to us in the previous " +"paragraph::" +msgstr "" + +#: ../../auth_tutorial.rst:30 +msgid "" +"If you have a web application and are using a callback URL that needs to " +"be supplied dynamically you would pass it in like so::" +msgstr "" + +#: ../../auth_tutorial.rst:36 +msgid "" +"If the callback URL will not be changing, it is best to just configure it" +" statically on twitter.com when setting up your application's profile." +msgstr "" + +#: ../../auth_tutorial.rst:40 +msgid "" +"Unlike basic auth, we must do the OAuth 1a \"dance\" before we can start " +"using the API. We must complete the following steps:" +msgstr "" + +#: ../../auth_tutorial.rst:43 +msgid "Get a request token from twitter" +msgstr "" + +#: ../../auth_tutorial.rst:45 +msgid "Redirect user to twitter.com to authorize our application" +msgstr "" + +#: ../../auth_tutorial.rst:47 +msgid "" +"If using a callback, twitter will redirect the user to us. Otherwise the " +"user must manually supply us with the verifier code." +msgstr "" + +#: ../../auth_tutorial.rst:51 +msgid "Exchange the authorized request token for an access token." +msgstr "" + +#: ../../auth_tutorial.rst:53 +msgid "So let's fetch our request token to begin the dance::" +msgstr "" + +#: ../../auth_tutorial.rst:60 +msgid "" +"This call requests the token from twitter and returns to us the " +"authorization URL where the user must be redirect to authorize us. Now if" +" this is a desktop application we can just hang onto our OAuthHandler " +"instance until the user returns back. In a web application we will be " +"using a callback request. So we must store the request token in the " +"session since we will need it inside the callback URL request. Here is a " +"pseudo example of storing the request token in a session::" +msgstr "" + +#: ../../auth_tutorial.rst:71 +msgid "" +"So now we can redirect the user to the URL returned to us earlier from " +"the get_authorization_url() method." +msgstr "" + +#: ../../auth_tutorial.rst:74 +msgid "" +"If this is a desktop application (or any application not using callbacks)" +" we must query the user for the \"verifier code\" that twitter will " +"supply them after they authorize us. Inside a web application this " +"verifier value will be supplied in the callback request from twitter as a" +" GET query parameter in the URL." +msgstr "" + +#: ../../auth_tutorial.rst:88 +msgid "" +"The final step is exchanging the request token for an access token. The " +"access token is the \"key\" for opening the Twitter API treasure box. To " +"fetch this token we do the following::" +msgstr "" + +#: ../../auth_tutorial.rst:105 +msgid "" +"It is a good idea to save the access token for later use. You do not need" +" to re-fetch it each time. Twitter currently does not expire the tokens, " +"so the only time it would ever go invalid is if the user revokes our " +"application access. To store the access token depends on your " +"application. Basically you need to store 2 string values: key and " +"secret::" +msgstr "" + +#: ../../auth_tutorial.rst:115 +msgid "" +"You can throw these into a database, file, or where ever you store your " +"data. To re-build an OAuthHandler from this stored access token you would" +" do this::" +msgstr "" + +#: ../../auth_tutorial.rst:122 +msgid "" +"So now that we have our OAuthHandler equipped with an access token, we " +"are ready for business::" +msgstr "" + +#: ../../auth_tutorial.rst:129 +msgid "OAuth 2 Authentication" +msgstr "" + +#: ../../auth_tutorial.rst:131 +msgid "" +"Tweepy also supports OAuth 2 authentication. OAuth 2 is a method of " +"authentication where an application makes API requests without the user " +"context. Use this method if you just need read-only access to public " +"information." +msgstr "" + +#: ../../auth_tutorial.rst:136 +msgid "" +"Like OAuth 1a, we first register our client application and acquire a " +"consumer key and secret." +msgstr "" + +#: ../../auth_tutorial.rst:139 +msgid "" +"Then we create an AppAuthHandler instance, passing in our consumer key " +"and secret::" +msgstr "" + +#: ../../auth_tutorial.rst:144 +msgid "With the bearer token received, we are now ready for business::" +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/code_snippet.po b/docs/locales/ko_KR/LC_MESSAGES/code_snippet.po new file mode 100644 index 0000000..7df698b --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/code_snippet.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../code_snippet.rst:6 +msgid "Code Snippets" +msgstr "" + +#: ../../code_snippet.rst:9 +msgid "Introduction" +msgstr "" + +#: ../../code_snippet.rst:11 +msgid "" +"Here are some code snippets to help you out with using Tweepy. Feel free " +"to contribute your own snippets or improve the ones here!" +msgstr "" + +#: ../../code_snippet.rst:15 +msgid "OAuth" +msgstr "" + +#: ../../code_snippet.rst:31 +msgid "Pagination" +msgstr "" + +#: ../../code_snippet.rst:46 +msgid "FollowAll" +msgstr "" + +#: ../../code_snippet.rst:48 +msgid "This snippet will follow every follower of the authenticated user." +msgstr "" + +#: ../../code_snippet.rst:56 +msgid "Handling the rate limit using cursors" +msgstr "" + +#: ../../code_snippet.rst:58 +msgid "" +"Since cursors raise ``RateLimitError``\\ s in their ``next()`` method, " +"handling them can be done by wrapping the cursor in an iterator." +msgstr "" + +#: ../../code_snippet.rst:61 +msgid "" +"Running this snippet will print all users you follow that themselves " +"follow less than 300 people total - to exclude obvious spambots, for " +"example - and will wait for 15 minutes each time it hits the rate limit." +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/cursor_tutorial.po b/docs/locales/ko_KR/LC_MESSAGES/cursor_tutorial.po new file mode 100644 index 0000000..1fbb545 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/cursor_tutorial.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../cursor_tutorial.rst:5 +msgid "Cursor Tutorial" +msgstr "" + +#: ../../cursor_tutorial.rst:7 +msgid "This tutorial describes details on pagination with Cursor objects." +msgstr "" + +#: ../../cursor_tutorial.rst:10 +msgid "Introduction" +msgstr "" + +#: ../../cursor_tutorial.rst:12 +msgid "" +"We use pagination a lot in Twitter API development. Iterating through " +"timelines, user lists, direct messages, etc. In order to perform " +"pagination, we must supply a page/cursor parameter with each of our " +"requests. The problem here is this requires a lot of boiler plate code " +"just to manage the pagination loop. To help make pagination easier and " +"require less code, Tweepy has the Cursor object." +msgstr "" + +#: ../../cursor_tutorial.rst:20 +msgid "Old way vs Cursor way" +msgstr "" + +#: ../../cursor_tutorial.rst:22 +msgid "" +"First let's demonstrate iterating the statuses in the authenticated " +"user's timeline. Here is how we would do it the \"old way\" before the " +"Cursor object was introduced::" +msgstr "" + +#: ../../cursor_tutorial.rst:38 +msgid "" +"As you can see, we must manage the \"page\" parameter manually in our " +"pagination loop. Now here is the version of the code using the Cursor " +"object::" +msgstr "" + +#: ../../cursor_tutorial.rst:46 +msgid "" +"Now that looks much better! Cursor handles all the pagination work for us" +" behind the scenes, so our code can now focus entirely on processing the " +"results." +msgstr "" + +#: ../../cursor_tutorial.rst:51 +msgid "Passing parameters into the API method" +msgstr "" + +#: ../../cursor_tutorial.rst:53 +msgid "What if you need to pass in parameters to the API method?" +msgstr "" + +#: ../../cursor_tutorial.rst:59 +msgid "" +"Since we pass Cursor the callable, we can not pass the parameters " +"directly into the method. Instead we pass the parameters into the Cursor " +"constructor method::" +msgstr "" + +#: ../../cursor_tutorial.rst:65 +msgid "" +"Now Cursor will pass the parameter into the method for us whenever it " +"makes a request." +msgstr "" + +#: ../../cursor_tutorial.rst:69 +msgid "Items or Pages" +msgstr "" + +#: ../../cursor_tutorial.rst:71 +msgid "" +"So far we have just demonstrated pagination iterating per item. What if " +"instead you want to process per page of results? You would use the " +"pages() method::" +msgstr "" + +#: ../../cursor_tutorial.rst:81 +msgid "Limits" +msgstr "" + +#: ../../cursor_tutorial.rst:83 +msgid "" +"What if you only want n items or pages returned? You pass into the " +"items() or pages() methods the limit you want to impose." +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/extended_tweets.po b/docs/locales/ko_KR/LC_MESSAGES/extended_tweets.po new file mode 100644 index 0000000..f3ad9b5 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/extended_tweets.po @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../extended_tweets.rst:6 +msgid "Extended Tweets" +msgstr "" + +#: ../../extended_tweets.rst:8 +msgid "This supplements `Twitter's Tweet updates documentation`_." +msgstr "" + +#: ../../extended_tweets.rst:11 +msgid "Introduction" +msgstr "" + +#: ../../extended_tweets.rst:13 +msgid "" +"On May 24, 2016, Twitter `announced `_ changes to the way that replies and URLs " +"are handled and `published plans `_ around support for these changes in the " +"Twitter API and initial technical documentation describing the updates to" +" Tweet objects and API options.\\ [#]_ On September 26, 2017, Twitter " +"`started testing " +"`_ 280 characters for certain " +"languages,\\ [#]_ and on November 7, 2017, `announced " +"`_" +" that the character limit was being expanded for Tweets in languages " +"where cramming was an issue.\\ [#]_" +msgstr "" + +#: ../../extended_tweets.rst:27 +msgid "Standard API methods" +msgstr "" + +#: ../../extended_tweets.rst:29 +msgid "" +"Any ``tweepy.API`` method that returns a Status object accepts a new " +"``tweet_mode`` parameter. Valid values for this parameter are ``compat`` " +"and ``extended``, which give compatibility mode and extended mode, " +"respectively. The default mode (if no parameter is provided) is " +"compatibility mode." +msgstr "" + +#: ../../extended_tweets.rst:35 +msgid "Compatibility mode" +msgstr "" + +#: ../../extended_tweets.rst:37 +msgid "" +"By default, using compatibility mode, the ``text`` attribute of Status " +"objects returned by ``tweepy.API`` methods is truncated to 140 " +"characters, as needed. When this truncation occurs, the ``truncated`` " +"attribute of the Status object will be ``True``, and only entities that " +"are fully contained within the available 140 characters range will be " +"included in the ``entities`` attribute. It will also be discernible that " +"the ``text`` attribute of the Status object is truncated as it will be " +"suffixed with an ellipsis character, a space, and a shortened self-" +"permalink URL to the Tweet." +msgstr "" + +#: ../../extended_tweets.rst:47 +msgid "Extended mode" +msgstr "" + +#: ../../extended_tweets.rst:49 +msgid "" +"When using extended mode, the ``text`` attribute of Status objects " +"returned by ``tweepy.API`` methods is replaced by a ``full_text`` " +"attribute, which contains the entire untruncated text of the Tweet. The " +"``truncated`` attribute of the Status object will be ``False``, and the " +"``entities`` attribute will contain all entities. Additionally, the " +"Status object will have a ``display_text_range`` attribute, an array of " +"two Unicode code point indices, identifying the inclusive start and " +"exclusive end of the displayable content of the Tweet." +msgstr "" + +#: ../../extended_tweets.rst:59 +msgid "Streaming" +msgstr "" + +#: ../../extended_tweets.rst:61 +msgid "" +"By default, the Status objects from streams may contain an " +"``extended_tweet`` attribute representing the equivalent field in the raw" +" data/payload for the Tweet. This attribute/field will only exist for " +"extended Tweets, containing a dictionary of sub-fields. The ``full_text``" +" sub-field/key of this dictionary will contain the full, untruncated text" +" of the Tweet, and the ``entities`` sub-field/key will contain the full " +"set of entities. If there are extended entities, the " +"``extended_entities`` sub-field/key will contain the full set of those. " +"Additionally, the ``display_text_range`` sub-field/key will contain an " +"array of two Unicode code point indices, identifying the inclusive start " +"and exclusive end of the displayable content of the Tweet." +msgstr "" + +#: ../../extended_tweets.rst:73 +msgid "Handling Retweets" +msgstr "" + +#: ../../extended_tweets.rst:75 +msgid "" +"When using extended mode with a Retweet, the ``full_text`` attribute of " +"the Status object may be truncated with an ellipsis character instead of " +"containing the full text of the Retweet. However, since the " +"``retweeted_status`` attribute (of a Status object that is a Retweet) is " +"itself a Status object, the ``full_text`` attribute of the Retweeted " +"Status object can be used instead." +msgstr "" + +#: ../../extended_tweets.rst:82 +msgid "" +"This also applies similarly to Status objects/payloads that are Retweets " +"from streams. The dictionary from the ``extended_tweet`` attribute/field " +"contains a ``full_text`` sub-field/key that may be truncated with an " +"ellipsis character. Instead, the ``extended_tweet`` attribute/field of " +"the Retweeted Status (from the ``retweeted_status`` attribute/field) can " +"be used." +msgstr "" + +#: ../../extended_tweets.rst:89 +msgid "Examples" +msgstr "" + +#: ../../extended_tweets.rst:91 +msgid "" +"Given an existing ``tweepy.API`` object and ``id`` for a Tweet, the " +"following can be used to print the full text of the Tweet, or if it's a " +"Retweet, the full text of the Retweeted Tweet::" +msgstr "" + +#: ../../extended_tweets.rst:101 +msgid "If ``status`` is a Retweet, ``status.full_text`` could be truncated." +msgstr "" + +#: ../../extended_tweets.rst:103 +msgid "" +"This Status event handler for a ``StreamListener`` prints the full text " +"of the Tweet, or if it's a Retweet, the full text of the Retweeted " +"Tweet::" +msgstr "" + +#: ../../extended_tweets.rst:118 +msgid "" +"If ``status`` is a Retweet, it will not have an ``extended_tweet`` " +"attribute, and ``status.text`` could be truncated." +msgstr "" + +#: ../../extended_tweets.rst:122 +msgid "Footnotes" +msgstr "" + +#: ../../extended_tweets.rst:123 +msgid "" +"https://twittercommunity.com/t/upcoming-changes-to-simplify-replies-and-" +"links-in-tweets/67497" +msgstr "" + +#: ../../extended_tweets.rst:124 +msgid "" +"https://twittercommunity.com/t/testing-280-characters-for-certain-" +"languages/94126" +msgstr "" + +#: ../../extended_tweets.rst:125 +msgid "" +"https://twittercommunity.com/t/updating-the-character-limit-and-the-" +"twitter-text-library/96425" +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/getting_started.po b/docs/locales/ko_KR/LC_MESSAGES/getting_started.po new file mode 100644 index 0000000..b6657aa --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/getting_started.po @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../getting_started.rst:6 +msgid "Getting started" +msgstr "" + +#: ../../getting_started.rst:9 +msgid "Introduction" +msgstr "" + +#: ../../getting_started.rst:11 +msgid "" +"If you are new to Tweepy, this is the place to begin. The goal of this " +"tutorial is to get you set-up and rolling with Tweepy. We won't go into " +"too much detail here, just some important basics." +msgstr "" + +#: ../../getting_started.rst:16 +msgid "Hello Tweepy" +msgstr "" + +#: ../../getting_started.rst:31 +msgid "" +"This example will download your home timeline tweets and print each one " +"of their texts to the console. Twitter requires all requests to use OAuth" +" for authentication. The :ref:`auth_tutorial` goes into more details " +"about authentication." +msgstr "" + +#: ../../getting_started.rst:37 +msgid "API" +msgstr "" + +#: ../../getting_started.rst:39 +msgid "" +"The API class provides access to the entire twitter RESTful API methods. " +"Each method can accept various parameters and return responses. For more " +"information about these methods please refer to :ref:`API Reference " +"`." +msgstr "" + +#: ../../getting_started.rst:45 +msgid "Models" +msgstr "" + +#: ../../getting_started.rst:47 +msgid "" +"When we invoke an API method most of the time returned back to us will be" +" a Tweepy model class instance. This will contain the data returned from " +"Twitter which we can then use inside our application. For example the " +"following code returns to us an User model::" +msgstr "" + +#: ../../getting_started.rst:55 +msgid "Models contain the data and some helper methods which we can then use::" +msgstr "" + +#: ../../getting_started.rst:63 +msgid "For more information about models please see ModelsReference." +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/index.po b/docs/locales/ko_KR/LC_MESSAGES/index.po new file mode 100644 index 0000000..975b287 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/index.po @@ -0,0 +1,39 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../index.rst:7 +msgid "Tweepy Documentation" +msgstr "Tweepy 기술 문서" + +#: ../../index.rst:9 +msgid "Contents:" +msgstr "" + +#: ../../index.rst:24 +msgid "Indices and tables" +msgstr "인덱스와 Tables" + +#: ../../index.rst:26 +msgid ":ref:`genindex`" +msgstr "" + +#: ../../index.rst:27 +msgid ":ref:`search`" +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/install.po b/docs/locales/ko_KR/LC_MESSAGES/install.po new file mode 100644 index 0000000..18ee9c5 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/install.po @@ -0,0 +1,31 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../install.rst:2 +msgid "Installation" +msgstr "" + +#: ../../install.rst:4 +msgid "Install from PyPI::" +msgstr "" + +#: ../../install.rst:8 +msgid "Install from source::" +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/parameters.po b/docs/locales/ko_KR/LC_MESSAGES/parameters.po new file mode 100644 index 0000000..db8cf93 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/parameters.po @@ -0,0 +1,19 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/running_tests.po b/docs/locales/ko_KR/LC_MESSAGES/running_tests.po new file mode 100644 index 0000000..8e2fc21 --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/running_tests.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../running_tests.rst:5 +msgid "Running Tests" +msgstr "" + +#: ../../running_tests.rst:7 +msgid "These steps outline how to run tests for Tweepy:" +msgstr "" + +#: ../../running_tests.rst:9 +msgid "Download Tweepy's source code to a directory." +msgstr "" + +#: ../../running_tests.rst:11 +msgid "" +"Install from the downloaded source with the ``test`` extra, e.g. ``pip " +"install .[test]``. Optionally install the ``dev`` extra as well, for " +"``tox`` and ``coverage``, e.g. ``pip install .[dev,test]``." +msgstr "" + +#: ../../running_tests.rst:15 +msgid "" +"Run ``python setup.py nosetests`` or simply ``nosetests`` in the source " +"directory. With the ``dev`` extra, coverage will be shown, and ``tox`` " +"can also be run to test different Python versions." +msgstr "" + +#: ../../running_tests.rst:19 +msgid "To record new cassettes, the following environment variables can be used:" +msgstr "" + +#: ../../running_tests.rst:21 +msgid "" +"``TWITTER_USERNAME`` ``CONSUMER_KEY`` ``CONSUMER_SECRET`` ``ACCESS_KEY`` " +"``ACCESS_SECRET`` ``USE_REPLAY``" +msgstr "" + +#: ../../running_tests.rst:28 +msgid "" +"Simply set ``USE_REPLAY`` to ``False`` and provide the app and account " +"credentials and username." +msgstr "" + diff --git a/docs/locales/ko_KR/LC_MESSAGES/streaming_how_to.po b/docs/locales/ko_KR/LC_MESSAGES/streaming_how_to.po new file mode 100644 index 0000000..3c535cb --- /dev/null +++ b/docs/locales/ko_KR/LC_MESSAGES/streaming_how_to.po @@ -0,0 +1,186 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2019, Joshua Roesslein +# This file is distributed under the same license as the tweepy package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: tweepy 3.8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-15 19:26+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../streaming_how_to.rst:8 +msgid "Streaming With Tweepy" +msgstr "" + +#: ../../streaming_how_to.rst:9 +msgid "" +"Tweepy makes it easier to use the twitter streaming api by handling " +"authentication, connection, creating and destroying the session, reading " +"incoming messages, and partially routing messages." +msgstr "" + +#: ../../streaming_how_to.rst:13 +msgid "" +"This page aims to help you get started using Twitter streams with Tweepy " +"by offering a first walk through. Some features of Tweepy streaming are " +"not covered here. See streaming.py in the Tweepy source code." +msgstr "" + +#: ../../streaming_how_to.rst:17 +msgid "" +"API authorization is required to access Twitter streams. Follow the " +":ref:`auth_tutorial` if you need help with authentication." +msgstr "" + +#: ../../streaming_how_to.rst:21 +msgid "Summary" +msgstr "" + +#: ../../streaming_how_to.rst:22 +msgid "" +"The Twitter streaming API is used to download twitter messages in real " +"time. It is useful for obtaining a high volume of tweets, or for " +"creating a live feed using a site stream or user stream. See the `Twitter" +" Streaming API Documentation`_." +msgstr "" + +#: ../../streaming_how_to.rst:27 +msgid "" +"The streaming api is quite different from the REST api because the REST " +"api is used to *pull* data from twitter but the streaming api *pushes* " +"messages to a persistent session. This allows the streaming api to " +"download more data in real time than could be done using the REST API." +msgstr "" + +#: ../../streaming_how_to.rst:33 +msgid "" +"In Tweepy, an instance of **tweepy.Stream** establishes a streaming " +"session and routes messages to **StreamListener** instance. The " +"**on_data** method of a stream listener receives all messages and calls " +"functions according to the message type. The default **StreamListener** " +"can classify most common twitter messages and routes them to " +"appropriately named methods, but these methods are only stubs." +msgstr "" + +#: ../../streaming_how_to.rst:41 +msgid "Therefore using the streaming api has three steps." +msgstr "" + +#: ../../streaming_how_to.rst:43 +msgid "Create a class inheriting from **StreamListener**" +msgstr "" + +#: ../../streaming_how_to.rst:45 +msgid "Using that class create a **Stream** object" +msgstr "" + +#: ../../streaming_how_to.rst:47 +msgid "Connect to the Twitter API using the **Stream**." +msgstr "" + +#: ../../streaming_how_to.rst:51 +msgid "Step 1: Creating a **StreamListener**" +msgstr "" + +#: ../../streaming_how_to.rst:52 +msgid "" +"This simple stream listener prints status text. The **on_data** method of" +" Tweepy's **StreamListener** conveniently passes data from statuses to " +"the **on_status** method. Create class **MyStreamListener** inheriting " +"from **StreamListener** and overriding **on_status**.::" +msgstr "" + +#: ../../streaming_how_to.rst:65 +msgid "Step 2: Creating a **Stream**" +msgstr "" + +#: ../../streaming_how_to.rst:66 +msgid "" +"We need an api to stream. See :ref:`auth_tutorial` to learn how to get an" +" api object. Once we have an api and a status listener we can create our " +"stream object.::" +msgstr "" + +#: ../../streaming_how_to.rst:73 +msgid "Step 3: Starting a Stream" +msgstr "" + +#: ../../streaming_how_to.rst:74 +msgid "" +"A number of twitter streams are available through Tweepy. Most cases will" +" use filter, the user_stream, or the sitestream. For more information on " +"the capabilities and limitations of the different streams see `Twitter " +"Streaming API Documentation`_." +msgstr "" + +#: ../../streaming_how_to.rst:79 +msgid "" +"In this example we will use **filter** to stream all tweets containing " +"the word *python*. The **track** parameter is an array of search terms to" +" stream. ::" +msgstr "" + +#: ../../streaming_how_to.rst:84 +msgid "" +"This example shows how to use **filter** to stream tweets by a specific " +"user. The **follow** parameter is an array of IDs. ::" +msgstr "" + +#: ../../streaming_how_to.rst:88 +msgid "" +"An easy way to find a single ID is to use one of the many conversion " +"websites: search for 'what is my twitter ID'." +msgstr "" + +#: ../../streaming_how_to.rst:91 +msgid "A Few More Pointers" +msgstr "" + +#: ../../streaming_how_to.rst:94 +msgid "Async Streaming" +msgstr "" + +#: ../../streaming_how_to.rst:95 +msgid "" +"Streams do not terminate unless the connection is closed, blocking the " +"thread. Tweepy offers a convenient **is_async** parameter on **filter** " +"so the stream will run on a new thread. For example ::" +msgstr "" + +#: ../../streaming_how_to.rst:102 +msgid "Handling Errors" +msgstr "" + +#: ../../streaming_how_to.rst:103 +msgid "" +"When using Twitter's streaming API one must be careful of the dangers of " +"rate limiting. If clients exceed a limited number of attempts to connect " +"to the streaming API in a window of time, they will receive error 420. " +"The amount of time a client has to wait after receiving error 420 will " +"increase exponentially each time they make a failed attempt." +msgstr "" + +#: ../../streaming_how_to.rst:108 +msgid "" +"Tweepy's **Stream Listener** passes error codes to an **on_error** stub. " +"The default implementation returns **False** for all codes, but we can " +"override it to allow Tweepy to reconnect for some or all codes, using the" +" backoff strategies recommended in the `Twitter Streaming API Connecting " +"Documentation`_. ::" +msgstr "" + +#: ../../streaming_how_to.rst:123 +msgid "" +"For more information on error codes from the Twitter API see `Twitter " +"Response Codes Documentation`_." +msgstr "" + -- 2.25.1