blob: ed6510e426666f476bda436c38f3b29a37e0540f [file] [log] [blame]
// Package wrapnewlines provides access to the Example API.
//
// Usage example:
//
// import "google.golang.org/api/wrapnewlines/v1"
// ...
// wrapnewlinesService, err := wrapnewlines.New(oauthHttpClient)
package wrapnewlines
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Background
const apiId = "wrapnewlines:v1"
const apiName = "wrapnewlines"
const apiVersion = "v1"
const basePath = "https://www.googleapis.com/discovery/v1/apis"
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
// Thing: don't care
type Thing struct {
// Oneline: First sentence. Second sentence. Description is long enough
// to be wrapped.
Oneline string `json:"oneline,omitempty"`
// Twoline: First sentence.
// Second sentence. Description is long enough to be wrapped.
Twoline string `json:"twoline,omitempty"`
}