Skip to content

Commit

Permalink
add links to docs for methods/requests/proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
vazaha-nl committed Aug 8, 2023
1 parent eabf014 commit 1f268ab
Show file tree
Hide file tree
Showing 255 changed files with 5,257 additions and 4,104 deletions.
48 changes: 48 additions & 0 deletions src/Proxies/AccountsProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class AccountsProxy extends Proxy
* Block account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#block
*/
public function block(
string $id,
Expand Down Expand Up @@ -78,6 +80,8 @@ public function block(
* @param bool $agreement Whether the user agrees to the local rules, terms, and policies. These should be presented to the user in order to allow them to consent before setting this parameter to TRUE.
* @param string $locale the language of the confirmation email that will be sent
* @param ?string $reason if registrations require manual approval, this text will be reviewed by moderators
*
* @see https://docs.joinmastodon.org/methods/accounts/#create
*/
public function create(
string $username,
Expand Down Expand Up @@ -112,6 +116,8 @@ public function create(
* @param null|array<string> $id find familiar followers for the provided account IDs
*
* @return \Vazaha\Mastodon\Results\FamiliarFollowersResult<array-key,\Vazaha\Mastodon\Models\FamiliarFollowersModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#familiar_followers
*/
public function familiarFollowers(
?array $id = null,
Expand All @@ -131,6 +137,8 @@ public function familiarFollowers(
* @param string $id the ID of the Account in the database
*
* @return \Vazaha\Mastodon\Results\FeaturedTagResult<array-key,\Vazaha\Mastodon\Models\FeaturedTagModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#featured_tags
*/
public function featuredTags(
string $id,
Expand All @@ -151,6 +159,8 @@ public function featuredTags(
* @param ?bool $reblogs receive this account's reblogs in home timeline? Defaults to true
* @param ?bool $notify receive notifications when this account posts a status? Defaults to false
* @param null|array<string> $languages Filter received statuses for these languages. If not provided, you will receive this account's posts in all languages.
*
* @see https://docs.joinmastodon.org/methods/accounts/#follow
*/
public function follow(
string $id,
Expand Down Expand Up @@ -182,6 +192,8 @@ public function follow(
* @param ?int $limit Maximum number of results to return. Defaults to 40 accounts. Max 80 accounts.
*
* @return \Vazaha\Mastodon\Results\AccountResult<array-key,\Vazaha\Mastodon\Models\AccountModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#followers
*/
public function followers(
string $id,
Expand All @@ -204,6 +216,8 @@ public function followers(
* @param ?int $limit Maximum number of results to return. Defaults to 40 accounts. Max 80 accounts.
*
* @return \Vazaha\Mastodon\Results\AccountResult<array-key,\Vazaha\Mastodon\Models\AccountModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#following
*/
public function following(
string $id,
Expand All @@ -223,6 +237,8 @@ public function following(
* Get account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#get
*/
public function get(
string $id,
Expand All @@ -247,6 +263,8 @@ public function get(
* @param string $id the ID of the Account in the database
*
* @return \Vazaha\Mastodon\Results\IdentityProofResult<array-key,\Vazaha\Mastodon\Models\IdentityProofModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#identity_proofs
*/
public function identityProofs(
string $id,
Expand All @@ -266,6 +284,8 @@ public function identityProofs(
* @param string $id the ID of the Account in the database
*
* @return \Vazaha\Mastodon\Results\ListResult<array-key,\Vazaha\Mastodon\Models\ListModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#lists
*/
public function lists(
string $id,
Expand All @@ -283,6 +303,8 @@ public function lists(
* Lookup account ID from Webfinger address.
*
* @param string $acct the username or Webfinger address to lookup
*
* @see https://docs.joinmastodon.org/methods/accounts/#lookup
*/
public function lookup(
string $acct,
Expand All @@ -307,6 +329,8 @@ public function lookup(
* @param string $id the ID of the Account in the database
* @param ?bool $notifications mute notifications in addition to statuses? Defaults to true
* @param ?int $duration How long the mute should last, in seconds. Defaults to 0 (indefinite).
*
* @see https://docs.joinmastodon.org/methods/accounts/#mute
*/
public function mute(
string $id,
Expand Down Expand Up @@ -334,6 +358,8 @@ public function mute(
*
* @param string $id the ID of the Account in the database
* @param ?string $comment The comment to be set on that user. Provide an empty string or leave out this parameter to clear the currently set note.
*
* @see https://docs.joinmastodon.org/methods/accounts/#note
*/
public function note(
string $id,
Expand All @@ -358,6 +384,8 @@ public function note(
* Feature account on your profile.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#pin
*/
public function pin(
string $id,
Expand All @@ -382,6 +410,8 @@ public function pin(
* @param null|mixed[] $id check relationships for the provided account IDs
*
* @return \Vazaha\Mastodon\Results\RelationshipResult<array-key,\Vazaha\Mastodon\Models\RelationshipModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#relationships
*/
public function relationships(
?array $id = null,
Expand All @@ -399,6 +429,8 @@ public function relationships(
* Remove account from followers.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#remove_from_followers
*/
public function removeFromFollowers(
string $id,
Expand Down Expand Up @@ -427,6 +459,8 @@ public function removeFromFollowers(
* @param ?bool $following Limit the search to users you are following. Defaults to false.
*
* @return \Vazaha\Mastodon\Results\AccountResult<array-key,\Vazaha\Mastodon\Models\AccountModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#search
*/
public function search(
string $q,
Expand Down Expand Up @@ -463,6 +497,8 @@ public function search(
* @param ?string $tagged filter for statuses using a specific hashtag
*
* @return \Vazaha\Mastodon\Results\StatusResult<array-key,\Vazaha\Mastodon\Models\StatusModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#statuses
*/
public function statuses(
string $id,
Expand Down Expand Up @@ -498,6 +534,8 @@ public function statuses(
* Unblock account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unblock
*/
public function unblock(
string $id,
Expand All @@ -520,6 +558,8 @@ public function unblock(
* Unfollow account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unfollow
*/
public function unfollow(
string $id,
Expand All @@ -542,6 +582,8 @@ public function unfollow(
* Unmute account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unmute
*/
public function unmute(
string $id,
Expand All @@ -564,6 +606,8 @@ public function unmute(
* Unfeature account from profile.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unpin
*/
public function unpin(
string $id,
Expand Down Expand Up @@ -593,6 +637,8 @@ public function unpin(
* @param ?bool $bot whether the account has a bot flag
* @param ?bool $discoverable whether the account should be shown in the profile directory
* @param null|mixed[] $fields_attributes The profile fields to be set. Inside this hash, the key is an integer cast to a string (although the exact integer does not matter), and the value is another hash including `name` and `value`. By default, max 4 fields.
*
* @see https://docs.joinmastodon.org/methods/accounts/#update_credentials
*/
public function updateCredentials(
?string $display_name = null,
Expand Down Expand Up @@ -627,6 +673,8 @@ public function updateCredentials(

/**
* Verify account credentials.
*
* @see https://docs.joinmastodon.org/methods/accounts/#verify_credentials
*/
public function verifyCredentials(
): CredentialAccountModel {
Expand Down
22 changes: 22 additions & 0 deletions src/Proxies/Admin/AccountsProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class AccountsProxy extends Proxy
* @param ?string $warning_preset_id the ID of a preset warning
* @param ?string $text additional clarification for why this action was taken
* @param ?bool $send_email_notification Should an email be sent to the user with the above information?
*
* @see https://docs.joinmastodon.org/methods/accounts/#action
*/
public function action(
string $id,
Expand Down Expand Up @@ -68,6 +70,8 @@ public function action(
* Approve a pending account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#approve
*/
public function approve(
string $id,
Expand All @@ -90,6 +94,8 @@ public function approve(
* Delete an account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#delete
*/
public function delete(
string $id,
Expand All @@ -112,6 +118,8 @@ public function delete(
* Enable a currently disabled account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#enable
*/
public function enable(
string $id,
Expand All @@ -134,6 +142,8 @@ public function enable(
* View a specific account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#get-one
*/
public function getOne(
string $id,
Expand All @@ -156,6 +166,8 @@ public function getOne(
* Reject a pending account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#reject
*/
public function reject(
string $id,
Expand All @@ -178,6 +190,8 @@ public function reject(
* Unmark an account as sensitive.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unsensitive
*/
public function unsensitive(
string $id,
Expand All @@ -200,6 +214,8 @@ public function unsensitive(
* Unsilence an account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unsilence
*/
public function unsilence(
string $id,
Expand All @@ -222,6 +238,8 @@ public function unsilence(
* Unsuspend an account.
*
* @param string $id the ID of the Account in the database
*
* @see https://docs.joinmastodon.org/methods/accounts/#unsuspend
*/
public function unsuspend(
string $id,
Expand Down Expand Up @@ -263,6 +281,8 @@ public function unsuspend(
* @param ?int $limit Maximum number of results to return. Defaults to 100 accounts. Max 200 accounts.
*
* @return \Vazaha\Mastodon\Results\Admin\AccountResult<array-key,\Vazaha\Mastodon\Models\Admin\AccountModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#v1
*/
public function v1(
?bool $local = null,
Expand Down Expand Up @@ -329,6 +349,8 @@ public function v1(
* @param ?int $limit Maximum number of results to return. Defaults to 100 accounts. Max 200 accounts.
*
* @return \Vazaha\Mastodon\Results\Admin\AccountResult<array-key,\Vazaha\Mastodon\Models\Admin\AccountModel>
*
* @see https://docs.joinmastodon.org/methods/accounts/#v2
*/
public function v2(
?string $origin = null,
Expand Down
10 changes: 10 additions & 0 deletions src/Proxies/Admin/CanonicalEmailBlocksProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class CanonicalEmailBlocksProxy extends Proxy
*
* @param string $email The email to canonicalize, hash, and block. If this parameter is provided, `canonical_email_hash` will be ignored.
* @param ?string $canonical_email_hash The hash to test against. If `email` is not provided, this parameter is required.
*
* @see https://docs.joinmastodon.org/methods/canonical_email_blocks/#create
*/
public function create(
string $email,
Expand All @@ -49,6 +51,8 @@ public function create(
* Delete a canonical email block.
*
* @param string $id the ID of the Admin::CanonicalEmailBlock in the database
*
* @see https://docs.joinmastodon.org/methods/canonical_email_blocks/#delete
*/
public function delete(
string $id,
Expand All @@ -73,6 +77,8 @@ public function delete(
* @param ?int $limit Maximum number of results to return. Defaults to 100 blocks. Max 200 blocks.
*
* @return \Vazaha\Mastodon\Results\Admin\CanonicalEmailBlockResult<array-key,\Vazaha\Mastodon\Models\Admin\CanonicalEmailBlockModel>
*
* @see https://docs.joinmastodon.org/methods/canonical_email_blocks/#get
*/
public function get(
?int $limit = null,
Expand All @@ -90,6 +96,8 @@ public function get(
* Show a single canonical email block.
*
* @param string $id the ID of the Admin::CanonicalEmailBlock in the database
*
* @see https://docs.joinmastodon.org/methods/canonical_email_blocks/#get-one
*/
public function getOne(
string $id,
Expand All @@ -114,6 +122,8 @@ public function getOne(
* @param string $email the email to canonicalize and hash
*
* @return \Vazaha\Mastodon\Results\Admin\CanonicalEmailBlockResult<array-key,\Vazaha\Mastodon\Models\Admin\CanonicalEmailBlockModel>
*
* @see https://docs.joinmastodon.org/methods/canonical_email_blocks/#test
*/
public function test(
string $email,
Expand Down
2 changes: 2 additions & 0 deletions src/Proxies/Admin/DimensionsProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class DimensionsProxy extends Proxy
* @param ?int $limit the maximum number of results to return for sources, servers, languages, tag or instance dimensions
*
* @return \Vazaha\Mastodon\Results\Admin\DimensionResult<array-key,\Vazaha\Mastodon\Models\Admin\DimensionModel>
*
* @see https://docs.joinmastodon.org/methods/dimensions/#get
*/
public function get(
array $keys,
Expand Down
Loading

0 comments on commit 1f268ab

Please sign in to comment.