From cdc84ffb4a5997e8f2d4f50aad0486513bab7995 Mon Sep 17 00:00:00 2001 From: Winnie Chen Date: Fri, 7 Jun 2024 20:42:20 +0000 Subject: [PATCH] GITBOOK-543: Update API page link --- README.md | 2 +- .../get-started/run-your-first-query.md | 19 +++++++++---------- .../api-sdk-developers/getting-started.md | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cf46de8..e156220 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Analyze blockchain data with Snowflake SQL, create visualizations, and show off **Ideal for analysts:** Exploratory Data Analysis (EDA), growing your [analyst brand](https://flipsidecrypto.xyz/discover/analysts), building in public. \ -[🛠️](https://emojipedia.org/hammer-and-wrench) [**AP**](https://flipsidecrypto.xyz/account/api-keys)[**I & SDK**](https://flipsidecrypto.xyz/settings/api-keys)\ +[🛠️](https://emojipedia.org/hammer-and-wrench) [**API & SDK**](https://flipsidecrypto.xyz/settings/api)\ Generate an API key to submit queries directly from your dev or data science environment.\ \ **Ideal for builders:** Models, forecasts, or custom apps built in R, Python, React, or similar. diff --git a/products/api-sdk-developers/get-started/run-your-first-query.md b/products/api-sdk-developers/get-started/run-your-first-query.md index bda209e..c7a6f8f 100644 --- a/products/api-sdk-developers/get-started/run-your-first-query.md +++ b/products/api-sdk-developers/get-started/run-your-first-query.md @@ -1,6 +1,6 @@ # Run Your First Query -This tutorial assumes you have already signed up for a Flipside Account and generated an API key [here in Flipside's Data Studio](https://flipsidecrypto.xyz/account/api-keys). +This tutorial assumes you have already signed up for a Flipside Account and generated an API key [here in Flipside's Data Studio](https://flipsidecrypto.xyz/settings/api). ### 1. Install the SDK (or skip to #2 if using the API directly) @@ -38,10 +38,11 @@ install.packages("shroomDK") # from CRAN {% tabs %} {% tab title="Python SDK" %} -
from flipside import Flipside
+```python
+from flipside import Flipside
 
 # Initialize `Flipside` with your API Key and API Url
-flipside = Flipside("<YOUR_API_KEY>", "https://api-v2.flipsidecrypto.xyz")
+flipside = Flipside("", "https://api-v2.flipsidecrypto.xyz")
 
 sql = """
 SELECT 
@@ -51,10 +52,10 @@ FROM ethereum.core.fact_transactions
 WHERE block_timestamp >= GETDATE() - interval'7 days'
 GROUP BY 1
 """
-
-# Run the query against Flipside's query engine and await the results
+
+# Run the query against Flipside's query engine and await the results
 query_result_set = flipside.query(sql)
-
+``` {% endtab %} {% tab title="JS/TS/Node SDK" %} @@ -82,8 +83,8 @@ const queryResultSet = await flipside.query.run({sql: sql}); {% tab title="R SDK" %}
library(shroomDK)
-
-api_key = readLines("api_key.txt") # always gitignore your API keys!
+
+api_key = readLines("api_key.txt") # always gitignore your API keys!
 
 query <- { 
 "
@@ -213,7 +214,5 @@ page_count = 2
 # combine into a single data frame.
    results <- do.call(rbind.data.frame, results)
 ```
-
-
 {% endtab %}
 {% endtabs %}
diff --git a/products/api-sdk-developers/getting-started.md b/products/api-sdk-developers/getting-started.md
index 1029ecb..c14fb9e 100644
--- a/products/api-sdk-developers/getting-started.md
+++ b/products/api-sdk-developers/getting-started.md
@@ -10,7 +10,7 @@ description: >-
 
 ### 1. 🔑 Get Your Key
 
-Go to the [Flipside Data Studio](https://flipsidecrypto.xyz/settings/api-keys) and click "API" to generate your API key. Every account comes with 5000 free query seconds per month.
+Go to the [Flipside Data Studio](https://flipsidecrypto.xyz/settings/api) and click "API" to generate your API key. Every account comes with 5000 free query seconds per month.
 
 ### 2. 🛠 Pick Your SDK and Install It