-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sponsorships and sponsors endpoints to accounts API
- Loading branch information
Showing
6 changed files
with
144 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
json.extract! account, :id, :login, :data, :created_at, :updated_at, :last_synced_at, :sponsors_count, :sponsorships_count, :active_sponsorships_count, :sponsor_profile | ||
json.extract! account, :id, :login, :has_sponsors_listing, :data, :created_at, :updated_at, :last_synced_at, :sponsors_count, :sponsorships_count, :active_sponsorships_count, :sponsor_profile | ||
|
||
json.url account_url(account.login) | ||
json.api_url api_v1_account_url(account.login) | ||
json.html_url account.html_url | ||
json.sponsors_url account.sponsors_url | ||
json.sponsors_url account.sponsors_url | ||
json.sponsors_api_url api_v1_account_sponsors_url(account.login) | ||
json.sponsorships_api_url api_v1_account_sponsorships_url(account.login) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
json.extract! sponsorship, :id, :status, :created_at, :updated_at | ||
json.funder do | ||
json.partial! 'api/v1/accounts/account', account: sponsorship.funder | ||
end | ||
|
||
json.maintainer do | ||
json.partial! 'api/v1/accounts/account', account: sponsorship.maintainer | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.array! @sponsorships, partial: 'api/v1/sponsorships/sponsorship', as: :sponsorship |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters