# Changelog

## 7/27/24

## Re-enabled endpoint

<mark style="background-color:orange;">\[Updated]</mark> Re-enabled the `/metadata/get_latest_tweets` endpoint. It is currently set at 6 credits per successful call.

## 6/23/24

## Minor route changes and a new error

<mark style="background-color:orange;">\[Updated]</mark> The `/metadata/get_userid` endpoint's credit value is now `0` from `1` and <mark style="color:red;">does not</mark> require an api key to use.

<mark style="background-color:orange;">\[Updated]</mark> The default namespace endpoint `/info` <mark style="color:red;">does not</mark> require an api key to use.

<mark style="background-color:green;">\[Added]</mark> A new error has been added for users with a subscription. The below `429` error is shown if a user has a subscription, that subscription has expired, and there is no credits remaining.&#x20;

```
{"Error": "Subscription expired and credit value exceeded", "Endpoint": namespace, "Current credits": user_credits}, 429
```

## 4/7/24

### Addition: Pagination information

<mark style="background-color:green;">\[Added]</mark> The following routes have received pagination information:

* `/graph/get_followers`
* `/graph/get_following`
* `/alpha/get_score_history`
* `/metadata/get_metadata_history`
* `/metadata/get_tweets`

{% tabs %}
{% tab title="Pagination Response Example" %}

```python
{'user': 'oz_dao', 'how': 'username', 'page': 1, 'previous_page': None, 'next_page': None, 'page_items': 3, 'data': [{...}], 'current_credits': 1000}
```

{% endtab %}
{% endtabs %}

Routes with pagination information will always return these keys with a value of either a number or None: `page`, `previous_page`, `next_page`, `page_items`

### Updated: UTC/Zulu time handling for specific endpoints

<mark style="background-color:orange;">\[Updated]</mark> `/graph/get_followers` and `/graph/get_following` will now correctly interpret UTC/Zulu time ('Z'). For example, the datetime string `'2023-04-01T15:30:00Z'` will now be interpreted as `'2023-04-01T15:30:00+00:00'`, ensuring accurate timezone alignment.

## 3/26/24

### <mark style="color:red;">Breaking Update:</mark> Response Standardization

<mark style="background-color:orange;">\[Updated]</mark> All\* API responses under the `data` key are now standardized as a list of dictionaries, ensuring a consistent data format across our endpoints.

{% tabs %}
{% tab title="Successful Data Response Example" %}

```python
'data': [{'username': 'oz_dao', 'last_checked': '2024-03-18T12:20:26.473134+00:00'}]
```

{% endtab %}

{% tab title="Error Response Example" %}

```python
'data': [{'error': 'no data for username = oz_dao2'}]
```

{% endtab %}
{% endtabs %}

\*`/metadata/get_latest_tweets`, `/lists/get_list_members`, and `/lists/get_latest_list_tweets` will still return the following non-standardized response: `{"message": "This route coming soon!"}, 200`. Please note that calling these endpoints *<mark style="color:yellow;">**will not**</mark>* result in the loss of credits.

### Update: New optional parameter

<mark style="background-color:orange;">\[Updated]</mark> `/graph/get_followers` and `/graph/get_following` have been updated to accept an optional `since` parameter. This parameter should be an ISO formatted datetime string. Calling these 2 endpoints with this optional parameter allows you to fetch the latest followers/following since the specified datetime, otherwise it will fetch the latest 500 followers (if available).

{% tabs %}
{% tab title="Payload Example" %}

```
d = '2022-10-09'
d_datetime = datetime.datetime.strptime(d, '%Y-%m-%d')
d_iso = d_datetime.isoformat()

payload = {
    'user': 'oz_dao',
    'how': 'username',
    'page': 1,
    'since': d_iso # Optional!
}
```

{% endtab %}

{% tab title="Error Responses" %}

```python
'data': [{"error": "Invalid 'since' parameter format. It should be an ISO formatted datetime string."}]
'data': [{"error": "Invalid 'since' parameter type. It should be an ISO formatted string."}]
```

{% endtab %}
{% endtabs %}

## 3/25/24

### Addition: Response Body Key

<mark style="background-color:green;">\[Added]</mark> A `Current credits` key is now returned in the response body. This shows the current credits you have after an API call.

{% code title="Example Response" %}

```python
{'user': '...', 'data': [{...}], 'current_credits': 1000}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.totoml.app/changelog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
