- 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.
- Mastering Visual Studio 2017
- Python概率統計
- VMware View Security Essentials
- JavaScript 網頁編程從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- RTC程序設計:實時音視頻權威指南
- Hands-On C++ Game Animation Programming
- Functional Kotlin
- C語言程序設計同步訓練與上機指導(第三版)
- Android嵌入式系統程序開發:基于Cortex-A8(第2版)
- Kubernetes進階實戰
- Nagios Core Administration Cookbook(Second Edition)
- Angular應用程序開發指南
- ROS機器人編程實戰
- 原型設計:打造成功產品的實用方法及實踐