Skip to content

Commit

Permalink
Site IDs should be Int64 instead of Int32
Browse files Browse the repository at this point in the history
Follow up on c1407c2
  • Loading branch information
abjerner committed Jan 26, 2018
1 parent 387b68d commit eb63a03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal SiteimproveContentRawEndpoint(SiteimproveClient client) {
/// <see>
/// <cref>https://api.siteimprove.com/v2/documentation#!/Content/get_sites_site_id_content_pages_page_id</cref>
/// </see>
public SocialHttpResponse GetPage(int siteId, long pageId) {
public SocialHttpResponse GetPage(long siteId, long pageId) {
if (siteId <= 0) throw new ArgumentException("Argument siteId must be specified", "siteId");
if (pageId <= 0) throw new ArgumentException("Argument pageId must be specified", "pageId");
return Client.DoHttpGetRequest($"/v2/sites/{siteId}/content/pages/{pageId}");
Expand All @@ -46,7 +46,7 @@ public SocialHttpResponse GetPage(int siteId, long pageId) {
/// <see>
/// <cref>https://api.siteimprove.com/v2/documentation#!/Content/get_sites_site_id_content_pages</cref>
/// </see>
public SocialHttpResponse GetPages(int siteId) {
public SocialHttpResponse GetPages(long siteId) {
return GetPages(siteId, 0, 0);
}

Expand All @@ -60,7 +60,7 @@ public SocialHttpResponse GetPages(int siteId) {
/// <see>
/// <cref>https://api.siteimprove.com/v2/documentation#!/Content/get_sites_site_id_content_pages</cref>
/// </see>
public SocialHttpResponse GetPages(int siteId, int page, int pageSize) {
public SocialHttpResponse GetPages(long siteId, int page, int pageSize) {
return GetPages(new SiteimproveGetPagesOptions {
SiteId = siteId,
Page = page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal SiteimproveContentEndpoint(SiteimproveService service) {
/// <param name="siteId">The ID of the site.</param>
/// <param name="pageId">The ID of the page.</param>
/// <returns>An instance of <see cref="SiteimproveGetPageResponse"/> representing the response.</returns>
public SiteimproveGetPageResponse GetPage(int siteId, long pageId) {
public SiteimproveGetPageResponse GetPage(long siteId, long pageId) {
return SiteimproveGetPageResponse.ParseResponse(Raw.GetPage(siteId, pageId));
}

Expand All @@ -45,7 +45,7 @@ public SiteimproveGetPageResponse GetPage(int siteId, long pageId) {
/// </summary>
/// <param name="siteId">The ID of the site.</param>
/// <returns>An instance of <see cref="SiteimproveGetPagesResponse"/> representing the response.</returns>
public SiteimproveGetPagesResponse GetPages(int siteId) {
public SiteimproveGetPagesResponse GetPages(long siteId) {
return SiteimproveGetPagesResponse.ParseResponse(Raw.GetPages(siteId));
}

Expand All @@ -56,7 +56,7 @@ public SiteimproveGetPagesResponse GetPages(int siteId) {
/// <param name="page">The page to retrieve.</param>
/// <param name="pageSize">The number of item on each page.</param>
/// <returns>An instance of <see cref="SiteimproveGetPagesResponse"/> representing the response.</returns>
public SiteimproveGetPagesResponse GetPages(int siteId, int page, int pageSize) {
public SiteimproveGetPagesResponse GetPages(long siteId, int page, int pageSize) {
return SiteimproveGetPagesResponse.ParseResponse(Raw.GetPages(siteId, page, pageSize));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SiteimproveAnalyticsGetPeriodOptions : IGetOptions {
/// <summary>
/// Gets or sets the ID of the site.
/// </summary>
public int SiteId { get; set; }
public long SiteId { get; set; }

/// <summary>
/// Gets or sets the page number to show when more than one page in paged output.
Expand Down Expand Up @@ -57,7 +57,7 @@ public SiteimproveAnalyticsGetPeriodOptions() { }
/// Initializes a new instance with the specified <code>siteId</code>.
/// </summary>
/// <param name="siteId">The ID of the site.</param>
public SiteimproveAnalyticsGetPeriodOptions(int siteId) {
public SiteimproveAnalyticsGetPeriodOptions(long siteId) {
SiteId = siteId;
}

Expand All @@ -67,7 +67,7 @@ public SiteimproveAnalyticsGetPeriodOptions(int siteId) {
/// <param name="siteId">The ID of the site.</param>
/// <param name="page">The page that should be returned.</param>
/// <param name="pageSize">The maximum amount of items per page.</param>
public SiteimproveAnalyticsGetPeriodOptions(int siteId, int page, int pageSize) {
public SiteimproveAnalyticsGetPeriodOptions(long siteId, int page, int pageSize) {
SiteId = siteId;
Page = page;
PageSize = pageSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class SiteimproveGetPagesOptions : IGetOptions {
/// <summary>
/// Gets or sets the ID of the site.
/// </summary>
public int SiteId { get; set; }
public long SiteId { get; set; }

/// <summary>
/// Gets or sets the page to retrive. If set to <code>0</code> (default), the parameter will not be send to the
Expand Down

0 comments on commit eb63a03

Please sign in to comment.