Ad
  • Custom User Avatar

    Such change does not add anything valuable to the core concept of the kata. Also, it is too late and unnecessary to invalidate 5K solutions for the sake of this.

  • Custom User Avatar

    Your loadData is mutable.

  • Custom User Avatar

    Using outside API as kata material is not a good idea as they can change in any time, and the API might be available anymore in the future.

  • Custom User Avatar

    In the intervening two months, I have gained some valuable experience at CodePen in using APIs with JavaScript. But I still have no idea why I'm getting the error message "The response code should be 200" in this Codewars kata. How does my code pass like 12 times and then generate an error??? Any nudge in the right direction here would be greatly appreciated.

  • Custom User Avatar

    Failing on the message "The response code should be 200". I'm new to using APIs with JavaScript, so I have no idea what I should do about that. It's not mentioned in the instructions, not mentioned on the linked Instagram developer page, and the documentation online seems to require the use of a check like httpRequest.status === 200, but I'm not sure how that fits into the structure of the callback function that I am writing here. Any suggestions?

  • Custom User Avatar

    I think it's fixed now. I had issues re-publishing the kata.

    Your current solution wouldn't pass now :)

  • Custom User Avatar

    Way too easy to pass without actually calling any API.

  • Custom User Avatar

    My favourite thing about this kata is seeing which hashtag people decided to use for their solution :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Good point, the call to loadData is not tested.

  • Custom User Avatar

    technically you don't, because you don't actually have to call the method loadData to pass the test.

  • Custom User Avatar

    Does this require registering an Instagram account in order to obtain a valid access_token or client_id? Without it, I receive the following error:

    { meta: 
    { error_type: 'OAuthAccessTokenException',
    code: 400,
    error_message: 'The access_token provided is invalid.' } }
    
    { meta: 
    { error_type: 'OAuthParameterException',
    code: 400,
    error_message: 'The client_id provided is invalid and does not match a valid application.' } }
    
  • Custom User Avatar

    I suggest changing "his girlfriend" to "his EX girlfriend" in the description. That would make it more of an IRL situation :)

    Also, instead of 'your sister' could we have something less perverse, like 'myself'?

  • Custom User Avatar

    According to http://stackoverflow.com/a/25352300/2928562 String.charCodeAt() performs better than a regular expression..

  • Custom User Avatar

    According to http://stackoverflow.com/a/25352300/2928562 String.charCodeAt() performs better than a regular expression..