Skip to content

Commit 7175dc3

Browse files
author
mlisivick
committed
Update README
1 parent 4f63718 commit 7175dc3

1 file changed

Lines changed: 51 additions & 1 deletion

File tree

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# gdax-python
2-
A Python client for the [News API](https://newsapi.org/docs/)
2+
A Python client for the [News API](https://newsapi.org/docs/)
33

44
##### Provided under MIT License by Matt Lisivick.
55
*Note: this library may be subtly broken or buggy. The code is released under
@@ -10,3 +10,53 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1010
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1111
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1212
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
## General
15+
16+
This is a Python client library for News API V2. The functions for the library should mirror the
17+
endpoints from the [documentation](https://newsapi.org/docs/endpoints).
18+
19+
20+
## Installation
21+
Installation for the package can be done via pip.
22+
23+
```commandline
24+
pip install newsapi-python
25+
```
26+
27+
## Usage
28+
29+
After installation, import client into your project:
30+
31+
```python
32+
from newsapi import NewsApiClient
33+
```
34+
35+
Initialize the client with your API key:
36+
37+
```python
38+
api = NewsApiClient(api_key='b39f2009d5aa4ff3b6c37e6a266cb553')
39+
```
40+
41+
### Endpoints
42+
43+
#### Top Headlines
44+
45+
```python
46+
api.get_top_headlines(sources='bbc-news')
47+
```
48+
#### Everything
49+
50+
```python
51+
api.get_everything(q='bitcoin')
52+
```
53+
#### Sources
54+
55+
```python
56+
api.get_sources()
57+
```
58+
59+
## Support
60+
61+
Feel free to make suggestions or provide feedback regarding the library. Thanks.
62+
Reach out at [lisivickmatt@gmail.com]('mailto:lisivickmatt@gmail.com')

0 commit comments

Comments
 (0)