Skip to content

Commit

Permalink
Merge API results.
Browse files Browse the repository at this point in the history
  • Loading branch information
everaldorodrigo committed Oct 11, 2024
1 parent 1b3fa2d commit 8b204dc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/civic/graphql_contributor_avatars.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def gql(self, variant_id: int):
}
return query

def fetch(self, variant_id: int):
def fetch(self, api_url: str, variant_id: int):
try:
response = requests.post(
'https://civicdb.org/api/graphql',
api_url,
json=self.gql(variant_id=variant_id)
)
return response.json()
Expand Down
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/civic/graphql_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ def gql(self, variant_id: int):
}
return query

def fetch(self, variant_id: int):
def fetch(self, api_url: str, variant_id: int):
try:
response = requests.post(
'https://civicdb.org/api/graphql',
api_url,
json=self.gql(variant_id=variant_id)
)
return response.json()
Expand Down
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/civic/graphql_molecular_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def gql(self, variant_id: int):
}
return query

def fetch(self, variant_id: int):
def fetch(self, api_url: str, variant_id: int):
try:
response = requests.post(
'https://civicdb.org/api/graphql',
api_url,
json=self.gql(variant_id=variant_id)
)
return response.json()
Expand Down
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/civic/graphql_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ def gql(self, variant_id: int):
}
return query

def fetch(self, variant_id: int):
def fetch(self, api_url: str, variant_id: int):
try:
response = requests.post(
'https://civicdb.org/api/graphql',
api_url,
json=self.gql(variant_id=variant_id)
)
return response.json()
Expand Down
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/civic/graphql_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def gql(self):
}
return query

def fetch(self):
def fetch(self, api_url: str):
try:
response = requests.post(
'https://civicdb.org/api/graphql',
api_url,
json=self.gql()
)
return response.json()
Expand Down

0 comments on commit 8b204dc

Please sign in to comment.