comments

package
v0.0.0-...-b894dfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetCommentsFullURL         = client.BaseURL + "/%s/comment"
	AnswerCommentURL           = client.BaseURL + "/%s/feedback?commentId=%s"
	RedactOrDeleteCommentURL   = client.BaseURL + "/%s/feedback/%s"
	GetCommentsFeedbackFullURL = client.BaseURL + "/%s/feedback"
	GetCommentsFullCSVURL      = client.BaseURL + "/%s/comment/export?from=%s&to=%s"
	GetRaitingsURL             = client.BaseURL + "/%s/comment/statistic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerCommentBody

type AnswerCommentBody struct {
	ID int `json:"id"`
}

type AnswerCommentResponse

type AnswerCommentResponse struct {
	Code      string            `json:"code"`
	Message   *string           `json:"message"`
	Body      AnswerCommentBody `json:"body"`
	Timestamp time.Time         `json:"timestamp"`
}

type Comment

type Comment struct {
	PackageName    string `json:"packageName"`
	AppID          int    `json:"appId"`
	CommentID      int64  `json:"commentId"`
	UserName       string `json:"userName"`
	AppRating      int    `json:"appRating"`
	CommentStatus  string `json:"commentStatus"`
	CommentDate    string `json:"commentDate"`
	CommentText    string `json:"commentText"`
	LikeCounter    int    `json:"likeCounter"`
	DislikeCounter int    `json:"dislikeCounter"`
	UpdatedAt      string `json:"updatedAt"`
	AppVersionName string `json:"appVersionName"`
	Edited         bool   `json:"edited"`
}

nolint: tagliatelle

type Comments

type Comments struct {
	// contains filtered or unexported fields
}

func New

func New(
	c *client.Client,
	packageName string,
) *Comments

func (*Comments) AnswerComment

func (c *Comments) AnswerComment(
	ctx context.Context,
	commentID string,
	feedbackText string,
) (
	AnswerCommentResponse,
	error,
)

func (*Comments) DeleteFeedback

func (c *Comments) DeleteFeedback(
	ctx context.Context,
	feedbackID string,
) (
	DeleteFeedbackResponse,
	error,
)

func (*Comments) GetCommentFeedbackStatesFull

func (c *Comments) GetCommentFeedbackStatesFull(
	ctx context.Context,
	params url.Values,
) (
	GetCommentFeedbackResponse,
	error,
)

func (*Comments) GetCommentsCSVFile

func (c *Comments) GetCommentsCSVFile(
	ctx context.Context,
	dateFrom,
	dateTo string,
) (
	[]byte,
	error,
)

func (*Comments) GetCommentsFull

func (c *Comments) GetCommentsFull(
	ctx context.Context,
	params url.Values,
) (
	GetCommentsFullResponse,
	error,
)

func (*Comments) GetRaitings

func (c *Comments) GetRaitings(
	ctx context.Context,
) (
	GetRaitingsResponse,
	error,
)

func (*Comments) RedactFeedback

func (c *Comments) RedactFeedback(
	ctx context.Context,
	feedbackID string,
	feedbackText string,
) (
	RedactFeedbackResponse,
	error,
)

type DeleteFeedbackBody

type DeleteFeedbackBody struct {
	ID int64 `json:"id"`
}

type DeleteFeedbackResponse

type DeleteFeedbackResponse struct {
	Code      string             `json:"code"`
	Message   *string            `json:"message"`
	Body      DeleteFeedbackBody `json:"body"`
	Timestamp time.Time          `json:"timestamp"`
}

type FeedbackBody

type FeedbackBody struct {
	ID        string    `json:"id"`
	CommentID string    `json:"commentId"`
	Text      string    `json:"text"`
	Status    string    `json:"status"`
	Date      time.Time `json:"date"`
}

nolint: tagliatelle

type FeedbackText

type FeedbackText struct {
	Message string `json:"message"`
}

type GetCommentFeedbackResponse

type GetCommentFeedbackResponse struct {
	Code      string         `json:"code"`
	Message   *string        `json:"message"`
	Body      []FeedbackBody `json:"body"`
	Timestamp time.Time      `json:"timestamp"`
}

type GetCommentsFullResponse

type GetCommentsFullResponse struct {
	Code                string    `json:"code"`
	Message             *string   `json:"message"`
	GetCommentsFullBody []Comment `json:"body"`
	Timestamp           time.Time `json:"timestamp"`
}

nolint: tagliatelle

type GetRaitingsResponse

type GetRaitingsResponse struct {
	Code            string       `json:"code"`
	Message         *string      `json:"message"`
	GetRaitingsBody RaitingsBody `json:"body"`
	Timestamp       time.Time    `json:"timestamp"`
}

nolint: tagliatelle

type RaitingsBody

type RaitingsBody struct {
	GetRaitingsBodyRatings RaitingsBodyRatings `json:"ratings"`
	AverageUserRating      float64             `json:"averageUserRating"`
	TotalRatings           int                 `json:"totalRatings"`
	TotalResponses         int                 `json:"totalResponses"`
	RatingsNoComments      int                 `json:"ratingsNoComments"`
}

nolint: tagliatelle

type RaitingsBodyRatings

type RaitingsBodyRatings struct {
	AmountFive  int `json:"amountFive"`
	AmountFour  int `json:"amountFour"`
	AmountThree int `json:"amountThree"`
	AmountTwo   int `json:"amountTwo"`
	AmountOne   int `json:"amountOne"`
}

nolint: tagliatelle

type RedactFeedbackBody

type RedactFeedbackBody struct {
	ID int64 `json:"id"`
}

type RedactFeedbackResponse

type RedactFeedbackResponse struct {
	Code      string             `json:"code"`
	Message   *string            `json:"message"`
	Body      RedactFeedbackBody `json:"body"`
	Timestamp time.Time          `json:"timestamp"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL