Struct roctogen::endpoints::activity::Activity[][src]

pub struct Activity<'api> { /* fields omitted */ }

Implementations

impl<'api> Activity<'api>[src]

pub async fn check_repo_is_starred_by_authenticated_user_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityCheckRepoIsStarredByAuthenticatedUserError>
[src]

pub fn check_repo_is_starred_by_authenticated_user(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityCheckRepoIsStarredByAuthenticatedUserError>
[src]

pub async fn delete_repo_subscription_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityDeleteRepoSubscriptionError>
[src]


Delete a repository subscription

This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository’s subscription manually.

GitHub API docs for delete_repo_subscription


pub fn delete_repo_subscription(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityDeleteRepoSubscriptionError>
[src]


Delete a repository subscription

This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository’s subscription manually.

GitHub API docs for delete_repo_subscription


pub async fn delete_thread_subscription_async(
    &self,
    thread_id: i32
) -> Result<(), ActivityDeleteThreadSubscriptionError>
[src]


Delete a thread subscription

Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.

GitHub API docs for delete_thread_subscription


pub fn delete_thread_subscription(
    &self,
    thread_id: i32
) -> Result<(), ActivityDeleteThreadSubscriptionError>
[src]


Delete a thread subscription

Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.

GitHub API docs for delete_thread_subscription


pub async fn get_feeds_async(&self) -> Result<Feed, ActivityGetFeedsError>[src]


Get feeds

GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:

  • Timeline: The GitHub global public timeline
  • User: The public timeline for any user, using URI template
  • Current user public: The public timeline for the authenticated user
  • Current user: The private timeline for the authenticated user
  • Current user actor: The private timeline for activity created by the authenticated user
  • Current user organizations: The private timeline for the organizations the authenticated user is a member of.
  • Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.

Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.

GitHub API docs for get_feeds


pub fn get_feeds(&self) -> Result<Feed, ActivityGetFeedsError>[src]


Get feeds

GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:

  • Timeline: The GitHub global public timeline
  • User: The public timeline for any user, using URI template
  • Current user public: The public timeline for the authenticated user
  • Current user: The private timeline for the authenticated user
  • Current user actor: The private timeline for activity created by the authenticated user
  • Current user organizations: The private timeline for the organizations the authenticated user is a member of.
  • Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.

Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.

GitHub API docs for get_feeds


pub async fn get_repo_subscription_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<RepositorySubscription, ActivityGetRepoSubscriptionError>
[src]

pub fn get_repo_subscription(
    &self,
    owner: &str,
    repo: &str
) -> Result<RepositorySubscription, ActivityGetRepoSubscriptionError>
[src]

pub async fn get_thread_async(
    &self,
    thread_id: i32
) -> Result<Thread, ActivityGetThreadError>
[src]

pub fn get_thread(
    &self,
    thread_id: i32
) -> Result<Thread, ActivityGetThreadError>
[src]

pub async fn get_thread_subscription_for_authenticated_user_async(
    &self,
    thread_id: i32
) -> Result<ThreadSubscription, ActivityGetThreadSubscriptionForAuthenticatedUserError>
[src]


Get a thread subscription for the authenticated user

This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.

Note that subscriptions are only generated if a user is participating in a conversation–for example, they’ve replied to the thread, were @mentioned, or manually subscribe to a thread.

GitHub API docs for get_thread_subscription_for_authenticated_user


pub fn get_thread_subscription_for_authenticated_user(
    &self,
    thread_id: i32
) -> Result<ThreadSubscription, ActivityGetThreadSubscriptionForAuthenticatedUserError>
[src]


Get a thread subscription for the authenticated user

This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.

Note that subscriptions are only generated if a user is participating in a conversation–for example, they’ve replied to the thread, were @mentioned, or manually subscribe to a thread.

GitHub API docs for get_thread_subscription_for_authenticated_user


pub async fn list_events_for_authenticated_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListEventsForAuthenticatedUserParams>>
) -> Result<Vec<Event>, ActivityListEventsForAuthenticatedUserError>
[src]


List events for the authenticated user

If you are authenticated as the given user, you will see your private events. Otherwise, you’ll only see public events.

GitHub API docs for list_events_for_authenticated_user


pub fn list_events_for_authenticated_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListEventsForAuthenticatedUserParams>>
) -> Result<Vec<Event>, ActivityListEventsForAuthenticatedUserError>
[src]


List events for the authenticated user

If you are authenticated as the given user, you will see your private events. Otherwise, you’ll only see public events.

GitHub API docs for list_events_for_authenticated_user


pub async fn list_notifications_for_authenticated_user_async(
    &self,
    query_params: Option<impl Into<ActivityListNotificationsForAuthenticatedUserParams>>
) -> Result<Vec<Thread>, ActivityListNotificationsForAuthenticatedUserError>
[src]


List notifications for the authenticated user

List all notifications for the current user, sorted by most recently updated.

GitHub API docs for list_notifications_for_authenticated_user


pub fn list_notifications_for_authenticated_user(
    &self,
    query_params: Option<impl Into<ActivityListNotificationsForAuthenticatedUserParams>>
) -> Result<Vec<Thread>, ActivityListNotificationsForAuthenticatedUserError>
[src]


List notifications for the authenticated user

List all notifications for the current user, sorted by most recently updated.

GitHub API docs for list_notifications_for_authenticated_user


pub async fn list_org_events_for_authenticated_user_async(
    &self,
    username: &str,
    org: &str,
    query_params: Option<impl Into<ActivityListOrgEventsForAuthenticatedUserParams>>
) -> Result<Vec<Event>, ActivityListOrgEventsForAuthenticatedUserError>
[src]


List organization events for the authenticated user

This is the user’s organization dashboard. You must be authenticated as the user to view this.

GitHub API docs for list_org_events_for_authenticated_user


pub fn list_org_events_for_authenticated_user(
    &self,
    username: &str,
    org: &str,
    query_params: Option<impl Into<ActivityListOrgEventsForAuthenticatedUserParams>>
) -> Result<Vec<Event>, ActivityListOrgEventsForAuthenticatedUserError>
[src]


List organization events for the authenticated user

This is the user’s organization dashboard. You must be authenticated as the user to view this.

GitHub API docs for list_org_events_for_authenticated_user


pub async fn list_public_events_async(
    &self,
    query_params: Option<impl Into<ActivityListPublicEventsParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsError>
[src]


List public events

We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.

GitHub API docs for list_public_events


pub fn list_public_events(
    &self,
    query_params: Option<impl Into<ActivityListPublicEventsParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsError>
[src]


List public events

We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.

GitHub API docs for list_public_events


pub async fn list_public_events_for_repo_network_async(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListPublicEventsForRepoNetworkParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsForRepoNetworkError>
[src]

pub fn list_public_events_for_repo_network(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListPublicEventsForRepoNetworkParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsForRepoNetworkError>
[src]

pub async fn list_public_events_for_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListPublicEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsForUserError>
[src]

pub fn list_public_events_for_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListPublicEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListPublicEventsForUserError>
[src]

pub async fn list_public_org_events_async(
    &self,
    org: &str,
    query_params: Option<impl Into<ActivityListPublicOrgEventsParams>>
) -> Result<Vec<Event>, ActivityListPublicOrgEventsError>
[src]

pub fn list_public_org_events(
    &self,
    org: &str,
    query_params: Option<impl Into<ActivityListPublicOrgEventsParams>>
) -> Result<Vec<Event>, ActivityListPublicOrgEventsError>
[src]

pub async fn list_received_events_for_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReceivedEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListReceivedEventsForUserError>
[src]


List events received by the authenticated user

These are events that you’ve received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you’ll only see public events.

GitHub API docs for list_received_events_for_user


pub fn list_received_events_for_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReceivedEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListReceivedEventsForUserError>
[src]


List events received by the authenticated user

These are events that you’ve received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you’ll only see public events.

GitHub API docs for list_received_events_for_user


pub async fn list_received_public_events_for_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReceivedPublicEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListReceivedPublicEventsForUserError>
[src]

pub fn list_received_public_events_for_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReceivedPublicEventsForUserParams>>
) -> Result<Vec<Event>, ActivityListReceivedPublicEventsForUserError>
[src]

pub async fn list_repo_events_async(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListRepoEventsParams>>
) -> Result<Vec<Event>, ActivityListRepoEventsError>
[src]

pub fn list_repo_events(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListRepoEventsParams>>
) -> Result<Vec<Event>, ActivityListRepoEventsError>
[src]

pub async fn list_repo_notifications_for_authenticated_user_async(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListRepoNotificationsForAuthenticatedUserParams>>
) -> Result<Vec<Thread>, ActivityListRepoNotificationsForAuthenticatedUserError>
[src]

pub fn list_repo_notifications_for_authenticated_user(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListRepoNotificationsForAuthenticatedUserParams>>
) -> Result<Vec<Thread>, ActivityListRepoNotificationsForAuthenticatedUserError>
[src]

pub async fn list_repos_starred_by_authenticated_user_async(
    &self,
    query_params: Option<impl Into<ActivityListReposStarredByAuthenticatedUserParams<'api>>>
) -> Result<Vec<Repository>, ActivityListReposStarredByAuthenticatedUserError>
[src]


List repositories starred by the authenticated user

Lists repositories the authenticated user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_repos_starred_by_authenticated_user


pub fn list_repos_starred_by_authenticated_user(
    &self,
    query_params: Option<impl Into<ActivityListReposStarredByAuthenticatedUserParams<'api>>>
) -> Result<Vec<Repository>, ActivityListReposStarredByAuthenticatedUserError>
[src]


List repositories starred by the authenticated user

Lists repositories the authenticated user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_repos_starred_by_authenticated_user


pub async fn list_repos_starred_by_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReposStarredByUserParams<'api>>>
) -> Result<GetActivityListReposStarredByUserResponse200, ActivityListReposStarredByUserError>
[src]


List repositories starred by a user

Lists repositories a user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_repos_starred_by_user


pub fn list_repos_starred_by_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReposStarredByUserParams<'api>>>
) -> Result<GetActivityListReposStarredByUserResponse200, ActivityListReposStarredByUserError>
[src]


List repositories starred by a user

Lists repositories a user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_repos_starred_by_user


pub async fn list_repos_watched_by_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReposWatchedByUserParams>>
) -> Result<Vec<MinimalRepository>, ActivityListReposWatchedByUserError>
[src]

pub fn list_repos_watched_by_user(
    &self,
    username: &str,
    query_params: Option<impl Into<ActivityListReposWatchedByUserParams>>
) -> Result<Vec<MinimalRepository>, ActivityListReposWatchedByUserError>
[src]

pub async fn list_stargazers_for_repo_async(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListStargazersForRepoParams>>
) -> Result<GetActivityListStargazersForRepoResponse200, ActivityListStargazersForRepoError>
[src]


List stargazers

Lists the people that have starred the repository.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_stargazers_for_repo


pub fn list_stargazers_for_repo(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListStargazersForRepoParams>>
) -> Result<GetActivityListStargazersForRepoResponse200, ActivityListStargazersForRepoError>
[src]


List stargazers

Lists the people that have starred the repository.

You can also find out when stars were created by passing the following custom media type via the Accept header:

GitHub API docs for list_stargazers_for_repo


pub async fn list_watched_repos_for_authenticated_user_async(
    &self,
    query_params: Option<impl Into<ActivityListWatchedReposForAuthenticatedUserParams>>
) -> Result<Vec<MinimalRepository>, ActivityListWatchedReposForAuthenticatedUserError>
[src]

pub fn list_watched_repos_for_authenticated_user(
    &self,
    query_params: Option<impl Into<ActivityListWatchedReposForAuthenticatedUserParams>>
) -> Result<Vec<MinimalRepository>, ActivityListWatchedReposForAuthenticatedUserError>
[src]

pub async fn list_watchers_for_repo_async(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListWatchersForRepoParams>>
) -> Result<Vec<SimpleUser>, ActivityListWatchersForRepoError>
[src]


List watchers

Lists the people watching the specified repository.

GitHub API docs for list_watchers_for_repo


pub fn list_watchers_for_repo(
    &self,
    owner: &str,
    repo: &str,
    query_params: Option<impl Into<ActivityListWatchersForRepoParams>>
) -> Result<Vec<SimpleUser>, ActivityListWatchersForRepoError>
[src]


List watchers

Lists the people watching the specified repository.

GitHub API docs for list_watchers_for_repo


pub async fn mark_notifications_as_read_async(
    &self,
    body: PutActivityMarkNotificationsAsRead
) -> Result<PostReposCreateDeploymentResponse202, ActivityMarkNotificationsAsReadError>
[src]


Mark notifications as read

Marks all notifications as “read” removes it from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as “read.” To check whether any “unread” notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.

GitHub API docs for mark_notifications_as_read


pub fn mark_notifications_as_read(
    &self,
    body: PutActivityMarkNotificationsAsRead
) -> Result<PostReposCreateDeploymentResponse202, ActivityMarkNotificationsAsReadError>
[src]


Mark notifications as read

Marks all notifications as “read” removes it from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as “read.” To check whether any “unread” notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.

GitHub API docs for mark_notifications_as_read


pub async fn mark_repo_notifications_as_read_async(
    &self,
    owner: &str,
    repo: &str,
    body: PutActivityMarkRepoNotificationsAsRead
) -> Result<PutPullsUpdateBranchResponse202, ActivityMarkRepoNotificationsAsReadError>
[src]


Mark repository notifications as read

Marks all notifications in a repository as “read” removes them from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as “read.” To check whether any “unread” notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.

GitHub API docs for mark_repo_notifications_as_read


pub fn mark_repo_notifications_as_read(
    &self,
    owner: &str,
    repo: &str,
    body: PutActivityMarkRepoNotificationsAsRead
) -> Result<PutPullsUpdateBranchResponse202, ActivityMarkRepoNotificationsAsReadError>
[src]


Mark repository notifications as read

Marks all notifications in a repository as “read” removes them from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as “read.” To check whether any “unread” notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.

GitHub API docs for mark_repo_notifications_as_read


pub async fn mark_thread_as_read_async(
    &self,
    thread_id: i32
) -> Result<(), ActivityMarkThreadAsReadError>
[src]

pub fn mark_thread_as_read(
    &self,
    thread_id: i32
) -> Result<(), ActivityMarkThreadAsReadError>
[src]

pub async fn set_repo_subscription_async(
    &self,
    owner: &str,
    repo: &str,
    body: PutActivitySetRepoSubscription
) -> Result<RepositorySubscription, ActivitySetRepoSubscriptionError>
[src]


Set a repository subscription

If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository’s subscription completely.

GitHub API docs for set_repo_subscription


pub fn set_repo_subscription(
    &self,
    owner: &str,
    repo: &str,
    body: PutActivitySetRepoSubscription
) -> Result<RepositorySubscription, ActivitySetRepoSubscriptionError>
[src]


Set a repository subscription

If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository’s subscription completely.

GitHub API docs for set_repo_subscription


pub async fn set_thread_subscription_async(
    &self,
    thread_id: i32,
    body: PutActivitySetThreadSubscription
) -> Result<ThreadSubscription, ActivitySetThreadSubscriptionError>
[src]


Set a thread subscription

If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.

You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.

Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.

GitHub API docs for set_thread_subscription


pub fn set_thread_subscription(
    &self,
    thread_id: i32,
    body: PutActivitySetThreadSubscription
) -> Result<ThreadSubscription, ActivitySetThreadSubscriptionError>
[src]


Set a thread subscription

If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.

You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.

Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.

GitHub API docs for set_thread_subscription


pub async fn star_repo_for_authenticated_user_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityStarRepoForAuthenticatedUserError>
[src]


Star a repository for the authenticated user

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

GitHub API docs for star_repo_for_authenticated_user


pub fn star_repo_for_authenticated_user(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityStarRepoForAuthenticatedUserError>
[src]


Star a repository for the authenticated user

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

GitHub API docs for star_repo_for_authenticated_user


pub async fn unstar_repo_for_authenticated_user_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityUnstarRepoForAuthenticatedUserError>
[src]

pub fn unstar_repo_for_authenticated_user(
    &self,
    owner: &str,
    repo: &str
) -> Result<(), ActivityUnstarRepoForAuthenticatedUserError>
[src]

Auto Trait Implementations

impl<'api> RefUnwindSafe for Activity<'api>

impl<'api> Send for Activity<'api>

impl<'api> Sync for Activity<'api>

impl<'api> Unpin for Activity<'api>

impl<'api> UnwindSafe for Activity<'api>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.