Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
use new api (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemberTang authored Nov 20, 2023
1 parent 4c5f6df commit 35e7d56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/snyk_helpers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from requests import Response
import requests
from requests import Response
from snyk import SnykClient


def _get_snyk_tag_page(snyk_group_id: str, snyk_api_key: str,
page_number: int, page_size: int) -> Response:
snykurl: str = "https://api.snyk.io/api/v1/group/" + snyk_group_id + \
snykurl: str = "https://api.snyk.io/api/group/" + snyk_group_id + \
"/tags?perPage=" + str(page_size) + "&page=" + str(page_number)
headers: dict[str, str] = {
'Authorization': f'token {snyk_api_key}',
Expand Down Expand Up @@ -43,7 +43,7 @@ def _get_snyk_tags(snyk_group_id: str, snyk_api_key: str,

def _delete_tag(tag_dict, group_id, snyk_key):

delete_tag_url = "https://api.snyk.io/api/v1/group/" + group_id + "/tags/delete"
delete_tag_url = "https://api.snyk.io/api/group/" + group_id + "/tags/delete"
json_body = {
"key": tag_dict['key'],
"value": tag_dict['value'],
Expand Down

0 comments on commit 35e7d56

Please sign in to comment.