This is going to be quite hard to explain as it would seem you have the completly wrong end of the stick when it comes to working with HTTP XML API's.
All the things that you want to do are available, however you need to first understand how to use an API like this.
The API is like an interface between your own code and the forums own database and interacts directly with the forums database to complete which ever action you request from the API.
You would not use JavaScript to send the request to the API as JavaScript is client side and you would be exposing your login details to your client. You need to using Server Side Code to send the request and then parse the returned XML result. With Classic ASP you would use the Microsoft HTTPXML object to POST a request to the API with ASP.NET you would look at using HttpWebRequest and HttpWebResponse classes in System.Net namespace.
For example if you wanted to add a new user to the forums database you would use the CreateNewMember action. You would use ASP.NET to send a HTTP POST request to the API that contains your admin login, the action (CreateNewMember), and the data you want written to the database for the new member. The API would then return an XML response which would tell you if the action was successful or failed.
In the same was you could get data on a member from the forums API by using the GetMemberByName. You would use ASP.NET to POST your request to the API with your admin login, the action (GetMemberByName), and the members name. You would then have an XML Response that would contain all the data on this member. You would parse this XML to get the parts you require. You can see the type of response below:-
<ApiResponse> <ErrorCode>0</ErrorCode> <ErrorDescription/> − <ResultData recordcount="1"> − <Record> <Username>administrator</Username> <UserID>1</UserID> <Group>Admin Group</Group> <GroupID>1</GroupID> <MemberCode>administratorD91B6897ZZ</MemberCode> <EncryptedPassword>A85B3E67CFA695D711570FB9822C0CF82871903B</EncryptedPassword> <Salt>72964E7</Salt> <Active>True</Active> <Suspended>False</Suspended> <Joined>2007-01-01 00:00:00</Joined> <LastVisit>2009-10-06 07:12:06</LastVisit> <Email/> <Name/> <DOB/> <Gender/> <PostCount>13</PostCount> <Newsletter>False</Newsletter> </Record> </ResultData> </ApiResponse>
|