question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using variables in wrapper requests

See original GitHub issue

Hey

JMPerez kindly forwarded me here … thanks! Having issues concanting an array into the wrapped request for add to playlist

spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', JSON.stringify(finalUri))

gives me {name: “WebapiError”, message: “Bad Request”, statusCode: 400}

(Authentication is working fine) I have tried both spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', JSON.stringify(finalUri)) and spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', finalUri)

where finalUri is ["spotify:track:0D5zFzZDG2vFzmizPBoq9I","spotify:track:1wY2yIk3UtwLFZPcQgyejq","spotify:track:3KjskT7nZJT3bNF2eLelnh"]

or technically finalUri='["spotify:track:0D5zFzZDG2vFzmizPBoq9I","spotify:track:1wY2yIk3UtwLFZPcQgyejq","spotify:track:3KjskT7nZJT3bNF2eLelnh"]'

This is definetely not my favourite part of JS!

Haven’t been able to find anything in the notes here to explain how to use variables as part of a request

Thanks

Dan

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
happy-machinecommented, Dec 26, 2017

Fixed this… was a dumb mistake i was grabbing token with wrong scopes saved in an old node file! eeek sorry. Thanks onhernandes!

0reactions
onhernandescommented, Dec 27, 2017

Great! You’re welcome 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does Flask pass request variable through a decorator ...
I've been learning about python decorators and I was wondering how flask passes the request variable into the function I decorate with the ......
Read more >
how to pass wrapper class as parameter to another method ...
It will be normal call to second method with JSONWrapper parameter in that method. See example below public class JSONWrapper { public ...
Read more >
Building and Testing an API Wrapper in Python - Semaphore CI
We define a TMDB_API_KEY variable which gets the API key from the TMDB_API_KEY environment variable. Then, we go ahead and initialize a requests...
Read more >
Http wrapper - usage optimization · Issue #382 - GitHub
In this step I would suggest to call Handle functions with all needed variable values only (not with HTTP request). Handle function is...
Read more >
How to use flow variables in apex class - Salesforce Developers
Here we have created a wraaper class in flow input variable. In this wrapper class you can define more that one flow varriable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found