Comments (3)
I agree it looks weird but there currently isn't a standardized way of passing an array query parameter, so it's really a matter of taste (weird is pretty subjective).
Personally I'd rather ?category=sponsor,interaction
Or the way you mentioned.
from sponsorblockserver.
It is not totally subjective. Some way are more supported than others.
- python requests (a vastly used http lib) does
k=v1&k=v2
: https://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls - golang does
k=v1&k=v2
too: https://golang.org/pkg/net/url/#Values - ruby does the same : https://ruby-doc.org/stdlib-3.0.1/libdoc/uri/rdoc/URI.html#method-c-encode_www_form
- axios (js lib) does
k[]=v1&k[]=v2
: https://stackoverflow.com/questions/49944387/how-to-correctly-use-axios-params-with-arrays - crystal does
k=v1&k=v2
: https://crystal-lang.org/api/1.0.0/URI/Params.html#encode(hash:Hash(String,String%7CArray(String)))-class-method
k=v1&k=v2
or k[]=v1&k[]=v2
are common, k=v1,v2
is less, and I've never seen k=["v1","v2"]
:p
from sponsorblockserver.
This should already be possible, express handles repeated query parameter names as an array
https://expressjs.com/en/5x/api.html#req.query
this should be plug-and-play with an update to documentation
from sponsorblockserver.
Related Issues (20)
- Split database with reference tables
- Temporary automod bypass HOT 2
- Fix bug relating to user self upvotes HOT 1
- InnerTube duration fetcher HOT 1
- Time redis seperate from postgres
- Usage spike without cpu spike HOT 1
- finish hashedIP banning HOT 1
- Ensure channelID is fetched from innertube HOT 1
- Liveliness check still successful during certain errors that break the whole pod HOT 1
- "Undefined" error HOT 1
- videoID cleanup + validation HOT 1
- Submitting chapters with the same timings as an already existing chapter but with different descriptions returns HTTP 409
- it throws a syntax error if i try to run the tests or try to start the server HOT 4
- look into last-modified as an alternative to duration-check HOT 3
- Docker images are currently being pushed as the same tag HOT 2
- Change occurred endpoint HOT 2
- Make chapters editable by original creator
- Shuffle differential privacy for DeArrow submissions
- Allow DeArrow hashes to be more than 4 characters HOT 1
- SponsorBlock is muting segments instead of skipping them HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sponsorblockserver.