Giter VIP home page Giter VIP logo

Comments (5)

hyl avatar hyl commented on August 31, 2024

@lukaswhite I've just been doing a couple of tests, and it turns out that you can pass screen_name and user_id in the same API call. Do you mind if I go ahead and build this out with the ability for using both params in one request?

from node-twitter.

lukaswhite avatar lukaswhite commented on August 31, 2024

By all means; the "fix" above isn't doing anything right now, not got as far as a pull request or anything - just waiting on some sort of response.

Out of interest, why would you pass both the screen name and user_id, if they refer to the same user?

from node-twitter.

hyl avatar hyl commented on August 31, 2024

Flexibility, I guess. I was thinking of a particularly bizarre use case where a user provided something like ['102718482', 'twitterapi']. We can split that into screen_name=twitterapi&user_id=102718482 based on data type, and the response you get returns the user details for both the usernames provided in screen_name, and the id's provided in user_id. The response back from Twitter's API with the above data looks like this (when testing via cURL, anyway):

[ { "name":"Jamie Hoyle", "screen_name":"mightyshakerjnr", "id":102718482, "id_str":"102718482", "connections":[ "none" ] }, { "name":"Twitter API", "screen_name":"twitterapi", "id":6253282, "id_str":"6253282", "connections":[ "none" ] } ]

from node-twitter.

desmondmorris avatar desmondmorris commented on August 31, 2024

@hyl @lukaswhite I just pushed a new version which introduces a new callback pattern and better support for endpoints that have not been added. If you pull down twitter@1 you can use:

var params  = {};
client.get('friendships/lookup', params, function(error, data){
});

Eventually we will deprecate this helper functions as they will become impossible to scale.

from node-twitter.

desmondmorris avatar desmondmorris commented on August 31, 2024

@lukaswhite @hyl I will leave this open to keep the id vs screen_name discussion going

from node-twitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.