[swx] SWX-Pownce Service

Nederflash (Folkert Hielema) info at nederflash.nl
Wed Mar 5 16:53:06 PST 2008


Hello Herdiansah,

Pownce API is done , but unfortunately not yet public on swxformat.org 
Check the services folder in svn if you will.

There is also a new Babl API (Dutch short messages on different babl's 
(talk's or subjects if you like)

As answer to your question this is the current Pownce 2.0 SWX API 
postLink method:

/**
  * Method postLink Returns the send Link or Error.
  *
  * Authentication required.
  * @param (str) (required) application key - you can get a key on 
pownce.com if you have none
  * @param (str) (required) username - Auth. User for the post
  * @param (str) (required) password - Auth. password for the post
  * @param (str) (required) note_to - 'public','all', or use send to for 
listing
  * @param (str) (required) link - Valid web URL
  * @param (str) (optional) message - Main text body of the note
  * @return The posted note in given format
  * @author Folkert Hielema
  */
function postLink( $appKey, $user, $pass, $note_to, $link, $message ="")
{
	$url = 'api.pownce.com/2.0/send/link.json';
	$args = array( 'app_key'=>$appKey,'url'=> $link, 'note_to' => $note_to, 
'note_body' => $message);
	$response = $this->_jsonCall($url, $args, 'POST', $user, $pass);
	return $response;
}

Hope that helps,

Folkert


Herdiansah wrote:
> Hi All,
> 
> I have made an SWX-Pownce Service using Pownce API http:// 
> pownce.pbwiki.com/API Documentation2-0
> This service will be release as open source.
> 
> Anyway, I have two problem with method bellow:
> 1. Post A Link
>    a method with required parameter app_key & url from the API docs  
> but everytime I posted a link always return an error like this in SWX  
> Data Analyzer:
>   message: Missing or invalid required parameters: url (string)
>   status_code: 404 (number)
> request: http://api.pownce.com/2.0/send/link.json
> 
> I know that everytime we call a service to SWX gateway it will also  
> send a 'url' parameter as a reference for the crossdomain and this  
> 'post a link' method also required a 'url' parameter. could this be  
> the problem?
> 
> 2. Post A File
>     I don't have a clue how to make this upload method work for SWX.
> 
> here are some info related to SWX-Pownce Service:
> 1. Service file: Pownce.php
>      http://swx.dailyflashid.org/php/services/_idvr/showsource.php? 
> file=../Pownce.php
> 
> 2. SWX Explorer for testing this service
>      http://swx.dailyflashid.org/php/explorer/
> 
> 3. Pownce Application key: a42p4e00ob0gtqz404v1i2m9gpx00s9x
>      You may use this for testing also you need a pownce account to  
> call method some method related to User and Posting.
> 
> I would really appreciate if someone canhelp me on this.
> 
> Thanks,
> Herdiansah
> --------------------------------------------------------
> Mobile: +628151800094
> Portfolio: http://www.herdiansah.com
> Blog: http://www.dailyflashid.org/
> 
> 
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
> 
> 




More information about the swx mailing list