newsbot-portal/apiclient/client.go

22 lines
450 B
Go
Raw Normal View History

2024-05-12 09:21:20 -07:00
package apiclient
const (
HeaderContentType = "Content-Type"
MIMEApplicationForm = "application/x-www-form-urlencoded"
2024-05-12 10:46:00 -07:00
ApplicationJson = "application/json"
2024-05-12 09:21:20 -07:00
)
type ApiClient struct {
2024-05-12 10:46:00 -07:00
Articles Articles
Users Users
Sources Sources
2024-05-12 09:21:20 -07:00
}
func New(serverAddress string) ApiClient {
return ApiClient{
2024-05-12 10:46:00 -07:00
Articles: newArticleService(serverAddress),
Users: newUserService(serverAddress),
Sources: newSourceService(serverAddress),
2024-05-12 09:21:20 -07:00
}
}