Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

release/0.3.5 #2

Merged
merged 4 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions figshare/figshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import os
from urllib.request import urlretrieve

def issue_request(method, url, headers, data=None, binary=False):

def issue_request(method, url, headers, data=None, binary=False,
params=None):
"""Wrapper for HTTP request

Parameters
Expand All @@ -24,6 +26,9 @@ def issue_request(method, url, headers, data=None, binary=False):
binary: bool
Whether data is binary or not

params: dict
Additional information for URL GET request

Returns
-------
response_data: dict
Expand All @@ -32,7 +37,8 @@ def issue_request(method, url, headers, data=None, binary=False):
if data is not None and not binary:
data = json.dumps(data)

response = requests.request(method, url, headers=headers, data=data)
response = requests.request(method, url, headers=headers,
data=data, params=params)

try:
response.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='0.1.0',
version='0.3.5',

description='Figshare client for Project Cognoma',

Expand Down