- Python Social Media Analytics
- Siddhartha Chatterjee Michal Krystyanczuk
- 145字
- 2021-07-15 17:24:57
Selecting the endpoint
An endpoint indicates where a particular resource can be accessed. It is represented by an URL that contains the name of the action. Even though there are multiple endpoints for each API, we will focus on those used in the next chapters of the book. All other endpoints/actions you can find in the official API documentation.
The Twitter REST API allows clients to retrieve a sample of tweets based on search criteria. The search request is made up of a Boolean query with some additional optional parameters (to, from, list, url, and filter). We will store the endpoint URL for this resource in a url variable:
url_rest = "https://api.twitter.com/1.1/search/tweets.json"
Similarly, we will use an endpoint URL for the Streaming API that returns a random sample stream of statuses:
url_streaming = "https://stream.twitter.com/1.1/statuses/sample.json"
We will use both variables to retrieve and parse the data.
- Java逍遙游記
- 基于粒計算模型的圖像處理
- Maven Build Customization
- AngularJS Web Application Development Blueprints
- Python爬蟲開發與項目實戰
- Microsoft System Center Orchestrator 2012 R2 Essentials
- Python算法從菜鳥到達人
- Learning Unity 2D Game Development by Example
- 編程菜鳥學Python數據分析
- 打開Go語言之門:入門、實戰與進階
- Python項目實戰從入門到精通
- Java高并發編程詳解:深入理解并發核心庫
- 虛擬現實:引領未來的人機交互革命
- Mastering Kali Linux for Advanced Penetration Testing(Second Edition)
- Mastering CSS