scrazzz / redgifs

Simple Python API wrapper for the RedGIFs API
https://redgifs.rtfd.io
MIT License
93 stars 13 forks source link

Orders latest and oldest not working #22

Closed acctfpn closed 1 year ago

acctfpn commented 1 year ago

Summary

Both give an AttributeError

Reproduction Steps

Silly script for testing

from redgifs import API, Order
order = Order.latest
order = Order.oldest
order = Order.best
order = Order.new
order = Order.recent
order = Order.top28
order = Order.trending

I just saw there are test for the orders

Expected Result

Working like the other ones, or being removed from the documentation.

Actual Result

Traceback (most recent call last):
  File "/opt/server/bin/redgifs_batch_downloader.py", line 44, in <module>
    order = Order.oldest
            ^^^^^^^^^^^^
  File "/usr/lib64/python3.11/enum.py", line 784, in __getattr__
    raise AttributeError(name) from None
AttributeError: oldest

System Information

> python -m redgifs --version
- Python v3.11.6-final
- redgifs v1.7.2-final
- aiohttp v3.8.6
- system info: Linux 6.5.8-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 20 15:53:48 UTC 2023

BTW the github recomended command (python -m redgifs -v) for getting this info shows: redgifs: error: unrecognized arguments: -v

Checklist

Additional Information

No response

scrazzz commented 1 year ago

The 2 new values were added in 1.8.0alpha version (developmental version). The docs you were referring to was the latest version, (aka developmental version) and not the stable version. Refer the docs of the stable version if you are not using the developmental version.

scrazzz commented 1 year ago

BTW the github recomended command (python -m redgifs -v) for getting this info shows: redgifs: error: unrecognized arguments: -v

My bad. Thanks for pointing it out.

acctfpn commented 1 year ago

Thanks, I didn't realize there were docs for the stable version.