apitimelinefriends.php

Summary

APITimelineFriends

Show the friends timeline

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Show the friends timeline

Returns the 20 most recent statuses posted by the authenticating user and that user’s friends.  This is the equivalent of “You and friends” page in the web interface.

URL patterns

  • /api/statuses/friends_timeline.:format
  • /api/statuses/friends_timeline/:id.:format

Formats

  • xml
  • json
  • rss
  • atom

ID

  • username
  • user id

HTTP Method

  • GET

Requires Authentication

Sometimes (see: @ref authentication)

  • user_id - (Optional) Specifies a user by ID
  • screen_name - (Optional) Specifies a user by screename (nickname)
  • since_id - (Optional) Returns only statuses with an ID greater than (that is, more recent than) the specified ID.
  • max_id - (Optional) Returns only statuses with an ID less than (that is, older than) or equal to the specified ID.
  • count - (Optional) Specifies the number of statuses to retrieve.
  • page - (Optional) Specifies the page of results to retrieve.

Usage notes

  • The URL pattern is relative to the @ref apiroot.
  • The XML response uses <a href=”url target=”http://georss.org/Main_Page” name=”http://georss.org/Main_Page””>GeoRSS</a> to encode the latitude and longitude (see example response below <georss:point>).

Example usage

curl http://myinstance.com/api/statuses/friends_timeline/maiyannah.xml?count=1&page=2

Example response

<?xml version=”1.0”?> <statuses type=”array”> <status> <text>back from the !yul !drupal meet with Evolving Web folk, @anarcat, @webchick and others, and an interesting refresher on SQL indexing</text> <truncated>false</truncated> <created_at>Wed Mar 31 01:33:02 +0000 2010</created_at> <in_reply_to_status_id/> <source>&lt;a href=”url target=”http://somesourcecode.net/microblog/” name=”http://somesourcecode.net/microblog/””&gt;mbpidgin&lt;/a&gt;</source> <id>26674201</id> <in_reply_to_user_id/> <in_reply_to_screen_name/> <geo/> <favorited>false</favorited> <user> <id>246</id> <name>Mark</name> <screen_name>lambic</screen_name> <location>Montreal, Canada</location> <description>Geek</description> <profile_image_url>url target=”http://avatar.identi.ca/246-48-20080702141545.png” name=”http://avatar.identi.ca/246-48-20080702141545.png”</profile_image_url> <url>url target=”http://lambic.co.uk” name=”http://lambic.co.uk”</url> <protected>false</protected> <followers_count>73</followers_count> <profile_background_color>#F0F2F5</profile_background_color> <profile_text_color/> <profile_link_color>#002E6E</profile_link_color> <profile_sidebar_fill_color>#CEE1E9</profile_sidebar_fill_color> <profile_sidebar_border_color/> <friends_count>58</friends_count> <created_at>Wed Jul 02 14:12:15 +0000 2008</created_at> <favourites_count>2</favourites_count> <utc_offset>-14400</utc_offset> <time_zone>US/Eastern</time_zone> <profile_background_image_url/> <profile_background_tile>false</profile_background_tile> <statuses_count>933</statuses_count> <following>false</following> <notifications>false</notifications> </user> </status> </statuses>

PHP version

Tested with PHP 7.0

File Authors

Web