Documentation ¶
Overview ¶
Package crowi provides some Crowi APIs for Go
Index ¶
- type Attachment
- type AttachmentInfo
- type Attachments
- type AttachmentsService
- type Client
- type Config
- type ListOptions
- type Page
- type PageExtended
- type PageInfo
- type PageRevision
- type Pages
- type PagesListOptions
- type PagesService
- func (s *PagesService) Create(ctx context.Context, path, body string) (*Page, error)
- func (s *PagesService) Get(ctx context.Context, path string) (*Page, error)
- func (s *PagesService) List(ctx context.Context, path, user string, opt *PagesListOptions) (*Pages, error)
- func (s *PagesService) Update(ctx context.Context, id, body string) (*Page, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Attachment AttachmentInfo `json:"attachment"` Page interface{} `json:"page"` OK bool `json:"ok"` }
type AttachmentInfo ¶
type AttachmentInfo struct { FileFormat string `json:"fileFormat"` FileName string `json:"fileName"` OriginalName string `json:"originalName"` FilePath string `json:"filePath"` Creator interface{} `json:"creator"` ID string `json:"_id"` CreatedAt time.Time `json:"createdAt"` PageCreated bool `json:"pageCreated"` URL string `json:"url"` FileSize int `json:"fileSize"` V int `json:"__v"` }
type Attachments ¶
type Attachments struct { Attachments []AttachmentInfo `json:"attachments"` OK bool `json:"ok"` }
type AttachmentsService ¶
type AttachmentsService service
AttachmentsService handles communication with the Attachments related methods of the Crowi API.
func (*AttachmentsService) Add ¶
func (s *AttachmentsService) Add(ctx context.Context, id, file string) (*Attachment, error)
Add attaches an image file to the page. This request requires page_id and the image file path which you want to attach.
func (*AttachmentsService) List ¶
func (s *AttachmentsService) List(ctx context.Context, id string) (*Attachments, error)
List shows attachment list of the page. This request requires page_id
type Client ¶
type Client struct { http.Client Pages *PagesService Attachments *AttachmentsService // contains filtered or unexported fields }
type ListOptions ¶
type ListOptions struct {
Pagenation bool
}
type PageExtended ¶
type PageExtended struct {
Slack string `json:"slack"`
}
type PageInfo ¶
type PageInfo struct { Revision PageRevision `json:"revision"` V int `json:"__v"` RedirectTo interface{} `json:"redirectTo"` UpdatedAt time.Time `json:"updatedAt"` LastUpdateUser interface{} `json:"lastUpdateUser"` Creator interface{} `json:"creator"` Path string `json:"path"` ID string `json:"_id"` CreatedAt time.Time `json:"createdAt"` CommentCount int `json:"commentCount"` SeenUsers []interface{} `json:"seenUsers"` Liker []interface{} `json:"liker"` GrantedUsers []string `json:"grantedUsers"` Grant int `json:"grant"` Status string `json:"status"` Extended PageExtended `json:"extended,omitempty"` }
type PageRevision ¶
type PagesListOptions ¶
type PagesListOptions struct {
ListOptions
}
PagesListOptions specifies the optional parameters to the PagesService.List methods.
type PagesService ¶
type PagesService service
PagesService handles communication with the Pages related methods of the Crowi API.
func (*PagesService) Create ¶
Create makes a page in your Crowi. The request requires the path and page content used for the page name
func (*PagesService) List ¶
func (s *PagesService) List(ctx context.Context, path, user string, opt *PagesListOptions) (*Pages, error)
List shows the list of pages. A parameter of path or user is required.