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

Document API endpoints #196

Open
sn1ce opened this issue Jul 8, 2021 · 3 comments
Open

Document API endpoints #196

sn1ce opened this issue Jul 8, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@sn1ce
Copy link

sn1ce commented Jul 8, 2021

Hi there,

first of all, very cool project, i use this in like 5 lights currently.

I just wanted to know the correct api post request for solidColor..
Just red the code, but can't manage to find the correct syntax for it.

For the pattern it was easy

/pattern?value=56 (solid Color)

But when i try to use the solidColor in my POST (using curl in bash)
/solidColor?255,255,255

it says: not found.
Even in my webbrowser..

Can you guys maybe give a hint or a well documented version of all api requests?

Much appreciated!
Best,
sn1ce

@WarDrake
Copy link
Collaborator

WarDrake commented Jul 8, 2021

The correct address to call is :
/solidColor?r=255&g=255&b=255

as for pattern, use :
/patternName?value=Solid%20Color

the 56 is dependent on the number of patters available and/or visualizations so it might not be the same across different installations or configurations and might change on version updates. (mine is 57)

while using patternName will always yield the expected one

@WarDrake WarDrake added the enhancement New feature or request label Jul 8, 2021
@WarDrake WarDrake self-assigned this Jul 8, 2021
@WarDrake WarDrake changed the title API Post "not Found" Document API endpoints Jul 8, 2021
@sn1ce
Copy link
Author

sn1ce commented Jul 10, 2021

Hi again,
thanks for your quick response.

i tested your call and it's also saying "not found".

I am using commit
527148d (HEAD -> master, tag: 4.2)
Merge: a1e2c54 dda3a05

Any ideas what i am doing wrong?...

Best,

sn1ce

// EDIT

Yes, it was my fault. I am using a to old version. Just updated it to the current one, works like a charm. And nice "turn on"-effect!

Many thanks.

For the documentation, i would recommend to create a new collum, "examples". I am not that familiar with coding like this. Maybe some others to.

Have a nice weekend!

sn1ce

@sn1ce sn1ce closed this as completed Jul 10, 2021
@bb-Ricardo bb-Ricardo reopened this Jul 11, 2021
@bb-Ricardo
Copy link

Hi,

Good point. Some examples should be added to the documentation.

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

No branches or pull requests

3 participants