Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I am new to StackApps. I have created an account and I have got an API key.

Now my question is, how can I access user accounts? I'm interested in posted questions and answers. Is there a way to post a question or answer programmatically?

A C# .net example would be preferable.

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

You may not post data to the api but retrieving data in c# is quite simple.

  • Create a project and get an api key. To get started, just make use your project's name, whatever it is and your profile url as the app's website. This information can be modified at any time in the future.
  • Download the source code for Soapi.CS
  • Either build or add a project reference to Soapi.net35 or Soapi.net40 to your project

and from there, it is quite simple

var context = new ApiContext(apiKey).Initialize(false);

var site = context.find("http://stackapps.com");

var skysQuestions = site.Users.ById(14).Questions.ToList();

foreach (Question in skysQuestions)
{
  Console.WriteLine(Question.Title);
}
share|improve this answer
    
So how would one of my users actually submit a question? –  user4948 Feb 14 '11 at 0:12
    
@user: They would have to do it through the site itself. –  Nathan Osman Jun 28 '11 at 1:05
    
i added soad.dll as reference but i cant get Question as the Key word .. where did i go wrong –  user1542 Mar 9 '12 at 16:36
add comment

The current version of the API is read only, meaning you can not have users login and post answers/comments/questions. Theres documentation on the API, which you can get by click on the API documentation and help just here on the right column >>>>

share|improve this answer
add comment

You must log in to answer this question.

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