Skip to content

Commit

Permalink
update limit parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
egauzens committed Feb 17, 2024
1 parent 3696997 commit fd89ef0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/metrics/contentful.py
Expand Up @@ -54,13 +54,13 @@ def get_cda_client_entry(id):


def get_all_entries(content_type_id):
url = f'https://{Config.CTF_CMA_API_HOST}/spaces/{Config.CTF_SPACE_ID}/environments/master/entries?access_token={Config.CTF_CMA_ACCESS_TOKEN}&content_type={content_type_id}'
url = f'https://{Config.CTF_CMA_API_HOST}/spaces/{Config.CTF_SPACE_ID}/environments/master/entries?access_token={Config.CTF_CMA_ACCESS_TOKEN}&content_type={content_type_id}&limit=999'
response = requests.get(url=url)
return response.json()['items']


def get_all_published_entries(content_type_id):
url = f'https://{Config.CTF_CMA_API_HOST}/spaces/{Config.CTF_SPACE_ID}/environments/master/public/entries?access_token={Config.CTF_CMA_ACCESS_TOKEN}&content_type={content_type_id}'
url = f'https://{Config.CTF_CMA_API_HOST}/spaces/{Config.CTF_SPACE_ID}/environments/master/public/entries?access_token={Config.CTF_CMA_ACCESS_TOKEN}&content_type={content_type_id}&limit=999'
response = requests.get(url)
return response.json()['items']

Expand Down

0 comments on commit fd89ef0

Please sign in to comment.