Free Online Classifieds Advertising, Jobs, Houses, Cars, Stuff Classifieds  |  Free Business Directory Listing Directory  |  Standup Online Standup Online  |  Naked Forums Naked Forums  |  I Told You So I Told You So
Sign up now for your free personals profile including photos, winks, chat -
Everything the others charge you for! 3LOVES - Real free online dating!
3Loves API Documention
Overview
Authentication
Queries
Types
Friends
GetFriends
AddFriend
DeleteFriend
BlockUser
Messages
GetMessages
GetSentMessages
AddMessage
DeleteMessage
Media
GetPhotos
AddPhoto
DeletePhoto
GetNewMedia
Profiles
GetProfile
SearchProfiles
EditProfile
GetNewSignups
GetNewLogins
Overview
This API is aimed toward developers and webmasters who may wish to leverage off of the 3Loves platform to help grow and develop their sites. The API offers full use of the 3Loves customer base including all profile information, photos, video and audio. Full access to all 3Loves functionality including the ability access and display media, view and display messages and winks, send messages and winks, view and display customer and profile information and edit profile information.

This API is divided into two main groups of queries, public queries and private queries. As there names suggest a public query is a general query for information from 3Loves like show the last 10 people who logged on, show the profiles for everyone who is online in Melbourne, Private queries are queries against an individuals information and require appropriate authentication to access, for example update profile and change location or get all new messages for a particular user.

To begin using the API you will need to register for a 3Loves API Key.
Authentication
3Loves API Key
All access to the API is controlled via your 3Loves API Key which is needed to query the API. It is attached to the querystring of the URL you are querying. The key is your gateway to the API. To obtain a key complete the application form.

Example:
http://www.3loves.com.au/api/getprofile.aspx?apikey=12345

User Authentication
Authenticating access to a particular user so you can view and modify data on their behalf is done using HTTP Basic Authentication. This form of authentication is originally defined in RFC 1945, further reading and security issues may be found in RFC 2616 and RFC 2617. The basic authentication scheme requires the request to contain the user credentials in the header. The structure of the user credentials in the header is:

[userid] = [username]:[password]
[userid] is then encoded as a sequence of base-64 encoded characters

Example:
username "Aladdin" and password "open Sesame" would be combined as "Aladdin:Open Sesame" - which is encoded to QWxhZGRpbjpvcGVuIHNlc2FtZQ==. This encoded string is passed in the HTTP header of the request

GET /api/addmessage.aspx?apikey=12345 HTTP/1.0
Host: 3loves
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
This authentication needs to be passed with each request to a private query in the API.

We are looking further into a token authentication mechanism similar to the one used in the Google code API's, but for now this is the only supported user authentication model.
Queries
The 3Loves API is exposed through a set of queries to the API server. To make a query a HTTP request is formed targeted at the particular queries URL. The response is a plain XML result set containing the information requested in the query. The queries are grouped by the authentication level required to access them. Public queries require you to attach your 3Loves API Key to the querystring of the request and nothing further. Private queries require you to authenticate the user as well as pass the 3Loves API Key, this authentication model is discussed above.

Public Queries
GetProfile - Profile data of a user
GetPhotos - All the photos of a user
GetNewLogins - Latest users to sign in
GetFriends - List of friends of a user
GetNewMedia - List of new photos
GetNewSignups - List of new users
SearchProfiles - Comprehensive search of profiles


Private Queries
AddFriend - Add a new friend
AddMessage - Send a new or reply to a message
AddPhoto - Upload a new photo
BlockUser - Add user to blocked contacts list
DeleteFriend - Remove a friend
DeletePhoto - Remove a photo
DeleteMessage - Remove a message
EditProfile - Update any of the information in a profile
GetMessages - List of messages of the user
GetSentMessages - List of sent messages of the user
Data Types
There are various data types used through out the 3Loves API, these types represent the format of query response and request data. If the 3Loves API accepts a certain data type you must strictly use the corresponding values for that type, if you use data outside the range of accepted values you will get an error.

Basic Types
DateTime
String
Integer


Profile Types
SexField
SeekingField
RelationshipField
StatusField
LooksField
HairColourField
EyeColourField
BodyTypeField
WeightField
HeightField
PersonalityField
CultureField
ReligionField
StarSignField
EducationField
JobField
ChildrenField
WantChildrenField
SmokeField
DrinkField
OrderByField
OrderField


Locations
RegionField
CountryField
StateField


Advanced Types
ResultStatus
Customer
Media
Message
Profile
ProfileSearchResults