]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Irc/extlib/phergie/Phergie/Plugin/Twitter/laconica.class.php
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / plugins / Irc / extlib / phergie / Phergie / Plugin / Twitter / laconica.class.php
1 <?php
2 /**
3  * Sean's Simple Twitter Library - Laconica extension
4  *
5  * Copyright 2008, Sean Coates
6  * Usage of the works is permitted provided that this instrument is retained
7  * with the works, so that any entity that uses the works is notified of this
8  * instrument.
9  * DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
10  * ( Fair License - http://www.opensource.org/licenses/fair.php )
11  * Short license: do whatever you like with this.
12  * 
13  */
14 class Twitter_Laconica extends Twitter {
15
16     /**
17      * Constructor; sets up configuration.
18      * 
19      * @param string $user Laconica user name; null for limited read-only access
20      * @param string $pass Laconica password; null for limited read-only access
21      * @param string $baseUrl Base URL of Laconica install. Defaults to identi.ca
22      */
23     public function __construct($user=null, $pass=null, $baseUrl = 'http://identi.ca/') {
24         $this->baseUrl = $baseUrl;
25         parent::__construct($user, $pass);
26     }
27     
28     /**
29      * Returns the base API URL
30      */
31     protected function getUrlApi() {
32         return $this->baseUrlFull . 'api/';
33     }
34     
35     /**
36      * Output URL: status
37      */
38     public function getUrlOutputStatus(StdClass $tweet) {
39         return $this->baseUrl . 'notice/' . urlencode($tweet->id);
40     }
41 }