Metadata-Version: 2.1
Name: metrics-tools
Version: 0.0.1
Summary: Package for making calls to metrics.tools API
Home-page: https://github.com/jonnyblacklabel/metrics_tools
Author: Jonnyblacklabel
Author-email: mail@jonnyblacklabel.de
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: jsonpickle

# metrics_tools

A simple python package for making API calls to metrics.tools API.
https://metrics.tools/

It builds upon the requests package. The goal is to achiev an easy syntax for the API calls like: `mt.domain('example.com').rankings.get()`

## Basic usage
```python
from metrics_tools import MetricsTools

api_key = 'your api key'
mt = MetricsTools(api_key, verbose=True)

domain = mt.domain('example.com')

visibility = domain.sk.get()
rankings = domain.rankings.get()

keyword_details = mt.keyword('api').details.get()
```

## Response
The response is parsed into a simple object with fields as object attributes. Additionaly it contains the requests response as '._response'.
```python
example_domain.values # â†’ if values are present
example_domain.json # â†’ parsed json response
example_domain.result # â†’ 'success' or 'error'
```

## More Parameters
The API supports some additional parameters, respectifly filters, to narrow down the API answer. These filters can be used through the avalible functions.
```python
#Visibility for specific date
domain.sk.from_('2018-05-07').get()

#Min and max visibility value
domain.sk.minmax().get()

#Ranking position for domain and given keyword
domain.position.for_keyword('jens fauldrath').get()
```

API calls
=========
The minimum interval for calls is 0.2 sec.

