Beispiel #1
0
        public MastodonClient(string domain) : base($"https://{domain}", AuthMode.OAuth2, RequestMode.FormUrlEncoded)
        {
            Domain           = domain;
            BinaryParameters = new List <string> {
                "avatar", "header", "file"
            };

            Account        = new AccountsClient(this);
            Apps           = new AppsClient(this);
            Auth           = new AuthClient(this);
            Blocks         = new BlocksClient(this);
            CustomEmojis   = new CustomEmojisClient(this);
            DomainBlocks   = new DomainBlocksClient(this);
            Endorsements   = new EndorsementsClient(this);
            Favorites      = new FavoritesClient(this);
            Filters        = new FiltersClient(this);
            FollowRequests = new FollowRequestsClient(this);
            Follows        = new FollowsClient(this);
            Instance       = new InstanceClient(this);
            Lists          = new ListsClient(this);
            Media          = new MediaClient(this);
            Notifications  = new NotificationsClient(this);
            Push           = new PushClient(this);
            Reports        = new ReportsClient(this);
            SearchV1       = new SearchV1Client(this);
            SearchV2       = new SearchV2Client(this);
            Statuses       = new StatusesClient(this);
            Streaming      = new StreamingClient(this);
            Suggestions    = new SuggestionsClient(this);
            Timelines      = new TimelinesClient(this);
        }
Beispiel #2
0
        public MastodonClient(Credential credential, HttpClientHandler innerHandler = null) : base(credential, new OAuth2HttpClientHandler(innerHandler), RequestMode.FormUrlEncoded)
        {
            BinaryParameters = new List <string> {
                "avatar", "header", "file"
            };

            Account           = new AccountsClient(this);
            Apps              = new AppsClient(this);
            Auth              = new AuthClient(this);
            Blocks            = new BlocksClient(this);
            Conversations     = new ConversationsClient(this);
            CustomEmojis      = new CustomEmojisClient(this);
            DomainBlocks      = new DomainBlocksClient(this);
            Endorsements      = new EndorsementsClient(this);
            Favorites         = new FavoritesClient(this);
            Filters           = new FiltersClient(this);
            FollowRequests    = new FollowRequestsClient(this);
            Follows           = new FollowsClient(this);
            Instance          = new InstanceClient(this);
            Lists             = new ListsClient(this);
            Media             = new MediaClient(this);
            Notifications     = new NotificationsClient(this);
            Push              = new PushClient(this);
            Reports           = new ReportsClient(this);
            ScheduledStatuses = new ScheduledStatusesClient(this);
            SearchV1          = new SearchV1Client(this);
            SearchV2          = new SearchV2Client(this);
            Statuses          = new StatusesClient(this);
            Streaming         = new StreamingClient(this);
            Suggestions       = new SuggestionsClient(this);
            Timelines         = new TimelinesClient(this);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="FilterProcessors"/> class.
 /// </summary>
 /// <param name="client">The <see cref="FiltersClient"/> to use to connect to the Runtime.</param>
 /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param>
 /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param>
 /// <param name="loggerManager">The <see cref="ILoggerManager"/> to use for creating instances of <see cref="ILogger"/>.</param>
 public FilterProcessors(
     FiltersClient client,
     IReverseCallClients reverseCallClients,
     IEventConverter converter,
     ILoggerManager loggerManager)
 {
     _client             = client;
     _reverseCallClients = reverseCallClients;
     _converter          = converter;
     _loggerManager      = loggerManager;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PublicEventFilterProcessor"/> class.
 /// </summary>
 /// <param name="filterId">The unique <see cref="FilterId"/> for the event filter.</param>
 /// <param name="client">The <see cref="FiltersClient"/> to use to connect to the Runtime.</param>
 /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param>
 /// <param name="filter">The <see cref="ICanFilterPublicEvents"/> to use for filtering the events.</param>
 /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param>
 /// <param name="logger">The <see cref="ILogger"/> to use for logging.</param>
 public PublicEventFilterProcessor(
     FilterId filterId,
     FiltersClient client,
     IReverseCallClients reverseCallClients,
     ICanFilterPublicEvents filter,
     IEventConverter converter,
     ILogger logger)
     : base(filterId, converter, logger)
 {
     _client             = client;
     _reverseCallClients = reverseCallClients;
     _filter             = filter;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventFilterWithPartitionsProcessor"/> class.
 /// </summary>
 /// <param name="filterId">The unique <see cref="FilterId"/> for the event filter.</param>
 /// <param name="scope">The <see cref="ScopeId"/> of the scope in the Event Store where the filter will run.</param>
 /// <param name="client">The <see cref="FiltersClient"/> to use to connect to the Runtime.</param>
 /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param>
 /// <param name="filter">The <see cref="ICanFilterEventsWithPartition"/> to use for filtering the events.</param>
 /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param>
 /// <param name="logger">The <see cref="ILogger"/> to use for logging.</param>
 public EventFilterWithPartitionsProcessor(
     FilterId filterId,
     ScopeId scope,
     FiltersClient client,
     IReverseCallClients reverseCallClients,
     ICanFilterEventsWithPartition filter,
     IEventConverter converter,
     ILogger logger)
     : base(filterId, converter, logger)
 {
     _scope              = scope;
     _client             = client;
     _reverseCallClients = reverseCallClients;
     _filter             = filter;
 }