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

Create and/or document API for accessing, creating, deleting, etc of userstyles #322

Open
uncenter opened this issue Nov 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@uncenter
Copy link

Describe the change you'd like:

I would like to see some sort of API documentation covering the various routes.

Additional context:

We over at https://github.com/catppuccin/userstyles are looking to potentially mirror our userstyles collection to userstyles.world - see catppuccin/userstyles#1392. Since much of our repository is automated through scripts, we would like to be able to manage creating userstyles, removing userstyles, listing userstyles, getting a userstyle, etc in order to keep the list of mirrored userstyles up to date with the contents of the repository.

@uncenter uncenter added the enhancement New feature or request label Nov 13, 2024
@astyled
Copy link
Contributor

astyled commented Nov 16, 2024

You might want to take a look at https://userstyles.world/docs/endpoints. It's not in the ToC, not sure why.

Some things to note:

  • as of now, there are only user accounts and no API tokens, so you'll have to use a regular user account and auth via cookie. Which may or may not only last 91 days, I'm not sure if expiration is clientside-only.
  • there's a pull mirror feature for userstyles, it works well and eliminates the need to push style updates if you can tolerate a delay of 4 hours.
  • or you can trigger mirror on your style updates via a newer not-yet-documented endpoint: GET https://userstyles.world/mirror/<styleid>. It has a significant "rate limit" per-style though. So no frequent updates of the same style.

@uncenter
Copy link
Author

You might want to take a look at userstyles.world/docs/endpoints. It's not in the ToC, not sure why.

Oh amazing thank you!

there's a pull mirror feature for userstyles, it works well and eliminates the need to push style updates if you can tolerate a delay of 4 hours.

Yep this works fine for us - just adding them to an account is the priority.

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

2 participants