- 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.
- 一步一步學Spring Boot 2:微服務項目實戰
- Objective-C Memory Management Essentials
- Delphi程序設計基礎:教程、實驗、習題
- Building a Game with Unity and Blender
- Arduino by Example
- 基于免疫進化的算法及應用研究
- Object-Oriented JavaScript(Second Edition)
- Hands-On RESTful Web Services with Go
- JavaScript by Example
- Learning Python by Building Games
- AppInventor實踐教程:Android智能應用開發前傳
- Python之光:Python編程入門與實戰
- C語言程序設計與應用(第2版)
- Qlik Sense? Cookbook
- Exploring SE for Android