Fix #52 - Add API versioning (v1)
This commit is contained in:
2
app/views/api/v1/accounts/followers.rabl
Normal file
2
app/views/api/v1/accounts/followers.rabl
Normal file
@ -0,0 +1,2 @@
|
||||
collection @followers
|
||||
extends('api/v1/accounts/show')
|
2
app/views/api/v1/accounts/following.rabl
Normal file
2
app/views/api/v1/accounts/following.rabl
Normal file
@ -0,0 +1,2 @@
|
||||
collection @following
|
||||
extends('api/v1/accounts/show')
|
5
app/views/api/v1/accounts/relationship.rabl
Normal file
5
app/views/api/v1/accounts/relationship.rabl
Normal file
@ -0,0 +1,5 @@
|
||||
object @account
|
||||
attribute :id
|
||||
node(:following) { |account| @following[account.id] || false }
|
||||
node(:followed_by) { |account| @followed_by[account.id] || false }
|
||||
node(:blocking) { |account| @blocking[account.id] || false }
|
2
app/views/api/v1/accounts/relationships.rabl
Normal file
2
app/views/api/v1/accounts/relationships.rabl
Normal file
@ -0,0 +1,2 @@
|
||||
collection @accounts
|
||||
extends 'api/v1/accounts/relationship'
|
10
app/views/api/v1/accounts/show.rabl
Normal file
10
app/views/api/v1/accounts/show.rabl
Normal file
@ -0,0 +1,10 @@
|
||||
object @account
|
||||
|
||||
attributes :id, :username, :acct, :display_name, :note
|
||||
|
||||
node(:url) { |account| TagManager.instance.url_for(account) }
|
||||
node(:avatar) { |account| full_asset_url(account.avatar.url(:large, false)) }
|
||||
node(:header) { |account| full_asset_url(account.header.url(:medium, false)) }
|
||||
node(:followers_count) { |account| account.followers.count }
|
||||
node(:following_count) { |account| account.following.count }
|
||||
node(:statuses_count) { |account| account.statuses.count }
|
2
app/views/api/v1/accounts/statuses.rabl
Normal file
2
app/views/api/v1/accounts/statuses.rabl
Normal file
@ -0,0 +1,2 @@
|
||||
collection @statuses
|
||||
extends('api/v1/statuses/show')
|
Reference in New Issue
Block a user