Initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
token = os.getenv("BUFFER_ACCESS_TOKEN")
|
||||
url = "https://api.buffer.com/graphql"
|
||||
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
||||
|
||||
query = """
|
||||
query {
|
||||
__type(name: "AssetsInput") {
|
||||
inputFields {
|
||||
name
|
||||
type {
|
||||
name
|
||||
kind
|
||||
ofType { name kind }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
resp = requests.post(url, headers=headers, json={'query': query})
|
||||
print(json.dumps(resp.json(), indent=2))
|
||||
Reference in New Issue
Block a user