Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

"before" param for posts is not allowed #119

Open
ievans3024 opened this issue Nov 14, 2018 · 2 comments
Open

"before" param for posts is not allowed #119

ievans3024 opened this issue Nov 14, 2018 · 2 comments

Comments

@ievans3024
Copy link

ievans3024 commented Nov 14, 2018

Python 3.7.1
PyTumblr 0.0.8

>>> import pytumblr
>>> client = pytumblr.TumblrRestClient(TUMBLR_CLIENT_KEY, TUMBLR_CLIENT_SECRET, TUMBLR_TOKEN, TUMBLR_TOKEN_SECRET)
>>> client.posts('staff', before=1541048400)  # November 1, 2018 at 12:00 am
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ian/PycharmProjects/Stash/venv/lib/python3.7/site-packages/pytumblr/helpers.py", line 47, in add_dot_tumblr
    return fn(*args, **kwargs)
  File "/home/ian/PycharmProjects/Stash/venv/lib/python3.7/site-packages/pytumblr/__init__.py", line 133, in posts
    return self.send_api_request("get", url, kwargs, ['id', 'tag', 'limit', 'offset', 'reblog_info', 'notes_info', 'filter', 'api_key'], True)
  File "/home/ian/PycharmProjects/Stash/venv/lib/python3.7/site-packages/pytumblr/__init__.py", line 558, in send_api_request
    validate_params(valid_parameters, params)
  File "/home/ian/PycharmProjects/Stash/venv/lib/python3.7/site-packages/pytumblr/helpers.py", line 29, in validate_params
    raise Exception("{0} are not allowed fields".format(field_strings))
Exception: before are not allowed fields

Looking at the code, it looks like the allowed params defined in this package do not line up with the params defined in the API docs

@tehgarra
Copy link

tehgarra commented Dec 9, 2018

what platform are you using it on? i haven't been able to get the setup.py test to work at all

@ievans3024
Copy link
Author

@tehgarra installed via pip on arch linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants