mirror of
https://github.com/FlipsideCrypto/gitbook.git
synced 2026-02-06 10:47:06 +00:00
GITBOOK-435: change request with no subject merged in GitBook
This commit is contained in:
parent
d66cacb1c3
commit
7b350055f7
@ -2,7 +2,7 @@
|
||||
|
||||
Flipside makes available the following SDKs as higher-level, more developer-friendly wrappers over the API. Examples for each SDK are available throughout the [Concepts & Examples Section here](get-started/). 
|
||||
|
||||
<table><thead><tr><th width="255">Language</th><th width="143">Version</th><th>Source Code (Github)</th></tr></thead><tbody><tr><td>✅ Python</td><td>2.0.7</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/python">Source Code</a></td></tr><tr><td>✅ JS/TypeScript</td><td>2.0.0</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/js">Source Code</a></td></tr><tr><td>🏗 R</td><td>0.2.1</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/r/shroomDK">Source Code</a></td></tr></tbody></table>
|
||||
<table><thead><tr><th width="255">Language</th><th width="143">Version</th><th>Source Code (Github)</th></tr></thead><tbody><tr><td>✅ Python</td><td>2.0.7</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/python">Source Code</a></td></tr><tr><td>✅ JS/TypeScript</td><td>2.0.0</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/js">Source Code</a></td></tr><tr><td>✅ R</td><td>0.2.1</td><td><a href="https://github.com/FlipsideCrypto/sdk/tree/main/r/shroomDK">Source Code</a></td></tr></tbody></table>
|
||||
|
||||
Want an SDK for another language? Or want to create your own SDK? Please reach out in [Discord](https://discord.gg/ZmU3jQuu6W)! 
|
||||
|
||||
|
||||
@ -44,6 +44,37 @@ Subsequently, instantiate a new Flipside object using your API key and the new A
|
||||
const flipside = new Flipside("<YOUR_API_KEY>", "https://api-v2.flipsidecrypto.xyz");
|
||||
```
|
||||
{% endtab %}
|
||||
|
||||
{% tab title="R" %}
|
||||
```
|
||||
# Current CRAN version: 0.2.1
|
||||
packageVersion("shroomDK") == '0.2.1'
|
||||
install.packages("shroomDK")
|
||||
library(shroomDK)
|
||||
|
||||
file.exists("api_key.txt") # always gitignore your API keys!
|
||||
|
||||
api_key <- ReadLines("api_key.txt")
|
||||
|
||||
query <- {
|
||||
"
|
||||
SELECT
|
||||
date_trunc('hour', block_timestamp) as hour,
|
||||
count(distinct tx_hash) as tx_count
|
||||
FROM ethereum.core.fact_transactions
|
||||
WHERE block_timestamp >= GETDATE() - interval'7 days'
|
||||
GROUP BY 1
|
||||
"
|
||||
}
|
||||
|
||||
# auto_paginate_query "just works" similar to 0.1.1 behavior
|
||||
# use ?auto_paginate_query to see new detailed parameters.
|
||||
pull_data <- auto_paginate_query(
|
||||
query = query,
|
||||
api_key = api_key
|
||||
)
|
||||
```
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
The updated SDKs will automatically target the new API v2 endpoints.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user