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

new feature request: add climb to circuit #24

Open
lekanteto opened this issue Mar 12, 2024 · 5 comments
Open

new feature request: add climb to circuit #24

lekanteto opened this issue Mar 12, 2024 · 5 comments

Comments

@lekanteto
Copy link
Contributor

I would like to use this library to add a climb to one of my circuits on the kilterboard

@lemeryfertitta
Copy link
Owner

Thanks for the request! Seems quite reasonable. I'll have to dig up the API for add to circuit, but doing the same with climbs and ticks was fairly straightforward. I'll try to package this in with a new release of some of the other work in progress items.

@lekanteto
Copy link
Contributor Author

I'll have to dig up the API for add to circuit, but doing the same with climbs and ticks was fairly straightforward.

How did you dig up the API for climbs and ticks? With some hints by you I might be able to do the same for the circuits.

@lemeryfertitta
Copy link
Owner

I'll have to dig up the API for add to circuit, but doing the same with climbs and ticks was fairly straightforward.

How did you dig up the API for climbs and ticks? With some hints by you I might be able to do the same for the circuits.

You can either use a proxy and inspect the HTTPS traffic, e.g. by running the app in an emulator on Android Studio and having some kind of MITM proxy setup on your computer and Android Studio, or you can look through the decompiled source code in the APK.

I happen to have the decompiled code handy, but unfortunately the decompiler had some errors on the file related to saving climbs to circuits. My guess from looking at the smali file is that the endpoint is a PUT to /v1/circuits/<circuitUUID>/climbs and it maybe expects a payload like {climbs: ["climbUUID1", "climbUUID2"]} although the body is a little bit harder to determine from the smali file.

@lekanteto
Copy link
Contributor Author

Thanks for your help. I got mitm working. So if you need any other endpoints for the app, just let me know. ;-)

It looks like the endpoint is:
/v1/climbs/uuid/circuits
with payload
{
"circuits": [
"uuid",
"uuid",
"uuid"
]
}

If you want to remove a circuit, send the same request with the circuit not in that list.

@lemeryfertitta
Copy link
Owner

Nice! Appreciate it. If you want to add that endpoint functionality (or any others) to boardlib, feel free! The goal would also be to provide a UI via Climbdex eventually.

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

No branches or pull requests

2 participants