Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Latest commit

 

History

History
203 lines (155 loc) · 6.35 KB

PagesApi.md

File metadata and controls

203 lines (155 loc) · 6.35 KB

IO.Swagger.Api.PagesApi

All URIs are relative to https://coda.io/apis/v1

Method HTTP request Description
GetPage GET /docs/{docId}/pages/{pageIdOrName} Get a page
ListPages GET /docs/{docId}/pages List pages
UpdatePage PUT /docs/{docId}/pages/{pageIdOrName} Update a page

GetPage

Page GetPage (string docId, string pageIdOrName)

Get a page

Returns details about a page.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class GetPageExample
    {
        public void main()
        {

            var apiInstance = new PagesApi();
            var docId = docId_example;  // string | ID of the doc.
            var pageIdOrName = pageIdOrName_example;  // string | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. 

            try
            {
                // Get a page
                Page result = apiInstance.GetPage(docId, pageIdOrName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.GetPage: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
docId string ID of the doc.
pageIdOrName string ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.

Return type

Page

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListPages

PageList ListPages (string docId, int? limit = null, string pageToken = null)

List pages

Returns a list of pages in a Coda doc.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ListPagesExample
    {
        public void main()
        {

            var apiInstance = new PagesApi();
            var docId = docId_example;  // string | ID of the doc.
            var limit = 56;  // int? | Maximum number of results to return in this query. (optional) 
            var pageToken = pageToken_example;  // string | An opaque token used to fetch the next page of results. (optional) 

            try
            {
                // List pages
                PageList result = apiInstance.ListPages(docId, limit, pageToken);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.ListPages: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
docId string ID of the doc.
limit int? Maximum number of results to return in this query. [optional]
pageToken string An opaque token used to fetch the next page of results. [optional]

Return type

PageList

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePage

PageUpdateResult UpdatePage (PageUpdate body, string docId, string pageIdOrName)

Update a page

Update properties for a page.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UpdatePageExample
    {
        public void main()
        {

            var apiInstance = new PagesApi();
            var body = new PageUpdate(); // PageUpdate | Parameters for updating a page.
            var docId = docId_example;  // string | ID of the doc.
            var pageIdOrName = pageIdOrName_example;  // string | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. 

            try
            {
                // Update a page
                PageUpdateResult result = apiInstance.UpdatePage(body, docId, pageIdOrName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PagesApi.UpdatePage: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body PageUpdate Parameters for updating a page.
docId string ID of the doc.
pageIdOrName string ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.

Return type

PageUpdateResult

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]