Comments (4)
Um so when I do client.captions("VIDEO_ID", None)
, it returns something like this
Captions {
captions: [Caption {
label: "English (auto-generated)",
language: "",
url: "/api/v1/captions/FhhyqkbtaR4?label=English+%28auto-generated%29"
}]
}
Which contains the url to the real captions file, I guess I'll just fix up some docs on how this works and bump up the crate.
from invidious-rs.
But do u think its a bit overkill to bump up the version without any real changes?
from invidious-rs.
If I was you I'd just bump up the patch version to 0.7.3 as you only changed the docs.
from invidious-rs.
let client = get_invidious_client(); // The invidious client of this lib let result = client .fetch(&format!( "{}/api/v1/captions/{caption_id}?label={label}&languageCode={language}", client.instance )) .await?;
Given that client.captions()
returns a url that looks like this /api/v1/captions/FhhyqkbtaR4?label=English+%28auto-generated%29
, I have made some changes to the client.fetch()
function.
- That string can just be passed into
client.fetch()
, without needing to useformat!("{instance}{url}")
- The url can include leading slashed, or not
- The original behaviour of
client.fetch()
is a duplicate ofclient.method.fetch()
, so if you still want the original behaviour, it's still there. But sinceclient
is already specific to an instance, it would make sense to not ask for the instance address again
(note: that piece of code will break on 0.7.3)
from invidious-rs.
Related Issues (14)
- ClientAsync does not work in GTK mainloop HOT 1
- ClientAsync is not Clone HOT 7
- No documentation for the meaning of "continuation" field in "Comments" HOT 13
- Info for upcoming videos HOT 1
- Can't fetch a particular playlist HOT 5
- use Instant in Video and friends HOT 3
- search suggestions HOT 1
- Inconsistent types HOT 1
- sub_count field for video::Video HOT 1
- invidious::ClientSync not Clone HOT 1
- Inconsistent naming of field `.views` HOT 2
- common_types not implemented HOT 6
- Cannot get continuation of video::Comments HOT 1
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 invidious-rs.