Skip to content

Commit

Permalink
remove unreacheable route
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Mar 30, 2018
1 parent 6538d60 commit fad82f7
Showing 1 changed file with 0 additions and 85 deletions.
85 changes: 0 additions & 85 deletions isogeo_pysdk/isogeo_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,91 +732,6 @@ def keywords_thesaurus(self,
# end of method
return kwds_req.json()

def keywords_workgroup(self,
token,
owner_id,
query="",
thez_id="1616597fbc4348c8b11ef9d59cf594c8",
offset=0,
order_by="text",
order_dir="desc",
page_size=20,
specific_md=None,
specific_tag=None,
sub_resources=["count"],
prot="https"):
"""Search for keywords within a specific workgroup.
:param str token: API auth token
:param str owner_id: workgroup UUID
:param str prot: https [DEFAULT] or http
(use it only for dev and tracking needs).
"""
# checking bearer validity
token = checker.check_bearer_validity(token,
self.connect(self.app_id,
self.ct))

# specific resources specific parsing
if isinstance(specific_md, list) and len(specific_md):
specific_md = ",".join(specific_md)
elif specific_md is None:
specific_md = ""
else:
specific_md = ""

# specific tags specific parsing
if isinstance(specific_tag, list) and len(specific_tag):
specific_tag = ",".join(specific_tag)
elif specific_tag is None:
specific_tag = ""
else:
specific_tag = ""

# sub resources specific parsing
if isinstance(sub_resources, string_types) and sub_resources.lower() == "all":
sub_resources = self.SUBRESOURCES
elif isinstance(sub_resources, list) and len(sub_resources):
sub_resources = ",".join(sub_resources)
elif sub_resources is None:
sub_resources = ""
else:
sub_resources = ""
raise ValueError("Error: sub_resources argument must be a list,"
"'all' or empty")

# handling request parameters
payload = {'_id': specific_md,
'_include': sub_resources,
'_limit': page_size,
'_offset': offset,
'_tag': specific_tag,
'gid': owner_id,
'th': thez_id,
'ob': order_by,
'od': order_dir,
'q': query,
}

# search request
head = {"Authorization": "Bearer " + token[0],
"user-agent": self.app_name}
keywords_url = "{}://v1.{}.isogeo.com/groups/{}/keywords/search"\
.format(prot,
self.base_url,
owner_id)

kwds_req = requests.get(keywords_url,
headers=head,
params=payload,
proxies=self.proxies)

# checking response
checker.check_api_response(kwds_req)

# end of method
return kwds_req.json()

# -- DOWNLOADS -----------------------------------------------------------

def dl_hosted(self, token, id_resource, resource_link,
Expand Down

0 comments on commit fad82f7

Please sign in to comment.