WordPress Freelancer Profile Widget

Freelancer.com profile contains most of the important information about you and your freelancer.com activities. WordPress Freelance Profile Widget enables you to display some of these information about your freelancer.com profile.

How WordPress Freelancer Profile Widget obtains the information

Freelancer.com api methods allows anyone to query public freelancer information using api calls. You can get either xml or json responses from the api depending on the query parameters. WordPress Freelancer Profile Widget queries the freelancer.com api to obtain information about you using your freelancer.com username.

What is my freelancer.com username

When you visit your freelancer.com profile page, part of the url contains the username. e.g. Visit ‘View Profile’ via the ‘Profile’ menu of your freelancer.com dashboard. (You need to log-in to freelancer.com to access these menus) Note the address bar of your browser.

http://www.freelancer.com/u/upekshawisidaga.html http://www.freelancer.com/u/username.html

username part is your username. This will be used to query freelancer.com api to obtain publicly available information about you.

Note: In your freelancer.com profile page, the name in bold at the top of the page is the ‘Display Name’. This is NOT your username.

Which api method is used to obtain Freelancer Profile Details

Freelancer.com implements a RESTful architecture based on HTTP protocol. Results are returned either as xml or json. A typical api call structure is as follows.

http://api.freelancer.com/RES_TYPE/RES_CALL.FORMAT_EXT?PARAMS

RES_TYPE is the resource type we need to query. In this case we need to obtain profile information. Then ‘User’ should be used as the RES_TYPE.

RES_CALL is the call to make regarding a given resource. To obtain profile information RES_CALL is ‘Properties’.

FORMAT_EXT is the format of the expected response. Let’s use xml for this example.

PARAMS - parameters are used to further specify the api query. We need to specify the username as the id parameter to obtain profile information of a freelancer.com user. An example freelancer profile api query may look like the following.

http://api.freelancer.com/User/Properties.xml?id=upekshawisidaga http://api.freelancer.com/User/Properties.xml?id=username

Below is the response for the above query for ‘upekshawisidaga’

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
<profile xmlns="http://api.freelancer.com/schemas/xml-0.1">
  <url>http://www.freelancer.com/u/upekshawisidaga.html</url>
  <id>1739662</id>
  <username>upekshawisidaga</username>
  <logo_url>http://cdn3.f-cdn.com/ppic/2902067/logo/1739662/freelancer-photo.png</logo_url>
  <profile_logo_url>http://cdn4.f-cdn.com/ppic/2902068/logo/1739662/profile_logo_1739662.jpg</profile_logo_url>
  <reg_unixtime>1281514574</reg_unixtime>
  <reg_date>Wed, 11 Aug 2010 04:16:14 -0400</reg_date>
  <company>Continental Inc</company>
  <currency>1</currency>
  <timezone>167</timezone>
  <gold>0</gold>
  <address>
      <country>Sri Lanka</country>
      <city>Colombo</city>
  </address>
  <hourlyrate>10</hourlyrate>
  <rating>
      <avg>9.875</avg>
      <count>16</count>
  </rating>
  <provider_rating>
      <avg>10</avg>
      <count>15</count>
  </provider_rating>
  <jobs>
      <item>HTML5</item>
      <item>Javascript</item>
      <item>MySQL</item>
      <item>PHP</item>
      <item>Wordpress</item>
  </jobs>
</profile>

The above example is an xml response. But in the actual implementation of the WordPress Freelancer Profile Widget a json object is obtained and stored in WordPress transients. The expiration period of these transients can be configured in the settings pages. You can inspect these transients at time by visiting the settings tab of this plugin settings page. You can delete them at any given time too. This will enable you to manually refresh the cached api responses.

Freelancer Profile Widget Structure

Freelancer profile widget is managed via Profile tab in the plugin admin page. To reach profile widget related settings, go to plugin administration page (WordPress Admin > Plugins > Installed Plugins). Find the ‘UW Freelancer’ plugin. From the settings link under the plugin entry you can reach the WordPress Freelancer Profile Widget settings.

You can add or remove certain components from the Freelancer Profile Widget from this settings page. There are three settings sections in this page.

Freelancer Profile Information

You need to enter your username (userid) in this section. It will be used in ‘Freelancer Feedback’ and ‘Freelancer Affiliate’ widgets as well. This settings field can be considered as the most important setting in the WordPress Freelancer Plugin. Please follow the instruction on ‘What is my freelancer.com username’ (See above) section to find your username.