newsbot-portal/apiclient/client.go

22 lines
450 B
Go

package apiclient
const (
HeaderContentType = "Content-Type"
MIMEApplicationForm = "application/x-www-form-urlencoded"
ApplicationJson = "application/json"
)
type ApiClient struct {
Articles Articles
Users Users
Sources Sources
}
func New(serverAddress string) ApiClient {
return ApiClient{
Articles: newArticleService(serverAddress),
Users: newUserService(serverAddress),
Sources: newSourceService(serverAddress),
}
}