Beispiel #1
0
            public async Task GetNotificationsMethod()
            {
                var notifications = await NotificationsEndpoint.GetNotifications();

                Assert.NotNull(notifications);
                Assert.NotNull(notifications.List);
                Assert.NotEmpty(notifications.List);
            }
Beispiel #2
0
        public OneSignalClient(string apiKey)
        {
            _apiKey = apiKey;

            // Configure the Http Client
            HttpClient = new HttpClient
            {
                BaseAddress = new Uri(ApiEndpoint)
            };
            HttpClient.DefaultRequestHeaders.Add("authorization", $"Basic {_apiKey}");

            // Initialize the endpoints
            Apps            = new AppsEndpoint(this);
            DevicesEndpoint = new DevicesEndpoint(this);
            Notifications   = new NotificationsEndpoint(this);
        }
 public OAuthGoodreadsClient(string apiKey, string apiSecret, string accessToken, string accessSecret)
     : base(apiKey, apiSecret, accessToken, accessSecret)
 {
     Authors          = new AuthorsEnpoint(_connection);
     AuthorsFollowing = new AuthorsFollowingEndpoint(_connection);
     Books            = new BooksEndpoint(_connection);
     Comments         = new CommentsEndpoint(_connection);
     Events           = new EventsEndpoint(_connection);
     Followers        = new FollowersEndpoint(_connection);
     Friends          = new FriendsEndpoint(_connection);
     Groups           = new GroupsEndpoint(_connection);
     Notifications    = new NotificationsEndpoint(_connection);
     OwnedBooks       = new OwnedBooksEndpoint(_connection);
     Quotes           = new QuotesEndpoint(_connection);
     ReadStatuses     = new ReadStatusesEndpoint(_connection);
     Recommendations  = new RecommendationsEndpoint(_connection);
     Reviews          = new ReviewsEndpoint(_connection);
     Series           = new SeriesEndpoint(_connection);
     Shelves          = new ShelvesEndpoint(_connection);
     Topics           = new TopicsEndpoint(_connection);
     Updates          = new UpdatesEndpoint(_connection);
     Users            = new UsersEndpoint(_connection);
     UserStatuses     = new UserStatusesEndpoint(_connection);
 }