-3

The below 2 codes returns null always. How to get the list of questions using API Version 2.2?

  1. Question thisPost = context.Official
    .StackApps
    .Questions.ById(1)
    .WithComments(true)
    .First();
    
  2. var context = new ApiContext(apikey).Initialize(false);
    var site = context.Find("https://stackexchange.com/");
    
    var skysQuestions = site.Users.ById(1).Questions.ToList();
    
0

Several things:

  1. You appear to be trying to use Soapi.CS -- which is way obsolete and using an old API version that no longer functions. If you are going to use .net, try one of the more recent libraries like:

  2. This code: .Questions.ById(1) would fetch question #1, which has been deleted.
    The API will not fetch deleted questions. When testing you need to check your requests against the site to see if they make sense.

  3. If you have problems with a 3rd-party library, that's listed here on Stack Apps, do not post the report as a question -- since the issue is not with an official Stack Exchange product.

    Post such 3rd-party problems as "answers" on the libraries question page. You can see an example of someone doing that with this answer.

  • Hi Adams, Thank you for your response. I just posted the query with sample question id. Also i tried to use the recent libraries you mentioned. But i can able to get the questions which are handled by corresponding concern. For example i have used BridgeStack library and its returns the questions which are handling by Bridgestack. can you please let me know how to get the questions based on tag name? – Melody Jun 6 '16 at 9:39
  • Melody, that's a separate question from this one and has already been answered in the general sense. If you want to know how to do it using one of the libraries, then ask (as an "answer") in that library's announcement question, not here. (PS: I don't use .net ;) – Brock Adams Jun 6 '16 at 9:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .