Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Woelfel dwwoelfel

View GitHub Profile
View authsArgToHeaders.js
const resolve = (path, json) => {
if (Array.isArray(json)) {
return json.flatMap((item, i) => resolve([...path, i], item));
}
if (typeof json === 'object') {
return Object.keys(json).flatMap((k) => resolve([...path, k], json[k]));
}
if (typeof json === 'string') {
return [{path, value: json}];
}
@dwwoelfel
dwwoelfel / test
Created Feb 26, 2021
Gist description
View test
content
View GistInfo.graphql
query GistInfo($login: String!, $gistId: String!) {
gitHub {
user(login: $login) {
gist(name: $gistId) {
files {
language {
name
}
text
extension
View keybase.md

Keybase proof

I hereby claim:

  • I am dwwoelfel on github.
  • I am dww (https://keybase.io/dww) on keybase.
  • I have a public key ASBG8gDFXPOVrh1-d3PfaUkBajXSyU4OjrpN55-smBiNLgo

To claim this, I am signing this object:

View fetch-hubspot-contacts.py
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = YOUR_APP_ID
HUBSPOT_OAUTH_TOKEN = YOUR_OAUTH_TOKEN
client = Client(retries=2,
transport=RequestsHTTPTransport(
url='https://serve.onegraph.com/dynamic?app_id=' + APP_ID,
View fetch-intercom-users.py
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = YOUR_APP_ID
INTERCOM_OAUTH_TOKEN = YOUR_OAUTH_TOKEN
client = Client(retries=2,
transport=RequestsHTTPTransport(
url='https://serve.onegraph.com/dynamic?app_id=' + APP_ID,
@dwwoelfel
dwwoelfel / onegraph.py
Created Jul 12, 2018
Python OneGraph Client
View onegraph.py
# pip3 install gql
# pip3 install requests
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
APP_ID = 'YOUR_APP_ID'
client = Client(retries=2,
transport=RequestsHTTPTransport(