Skip to content

Commit

Permalink
Removed /indexes/{id} endpoint (Get market index by id) -> cg.get_ind…
Browse files Browse the repository at this point in the history
…exes_by_id()
  • Loading branch information
man-c committed Apr 19, 2021
1 parent f3296b5 commit fbdf58a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_indexes()
```
- **/indexes/{id}** (Get market index by id)
```python
cg.get_indexes_by_id()
```
#- **/indexes/{id}** (Get market index by id)
# ```python
# cg.get_indexes_by_id()
# ```
- **/indexes/list** (List market indexes id and name)
```python
cg.get_indexes_list()
Expand Down
10 changes: 5 additions & 5 deletions pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ def get_indexes(self, **kwargs):

return self.__request(api_url)

def get_indexes_by_id(self, id, **kwargs):
"""Get market index by id"""
#def get_indexes_by_id(self, id, **kwargs):
# """Get market index by id"""

api_url = '{0}indexes/{1}'.format(self.api_base_url, id)
api_url = self.__api_url_params(api_url, kwargs)
# api_url = '{0}indexes/{1}'.format(self.api_base_url, id)
# api_url = self.__api_url_params(api_url, kwargs)

return self.__request(api_url)
# return self.__request(api_url)

def get_indexes_list(self, **kwargs):
"""List market indexes id and name"""
Expand Down

0 comments on commit fbdf58a

Please sign in to comment.