// Get 雑談APIを呼び出して結果を取得する.
// refreshContextがtrueの場合、DocomoClientのContextを更新する
359212
func (d *DialogueService) Get(req DialogueRequest, refreshContext bool) (*DialogueResponse, error) {
	// context有効の場合、clientで保持しているcontextを設定する
	if refreshContext && req.Context != nil {
		d.SetContext(*req.Context)
	}

	var data []byte
	var err error
	if data, err = json.Marshal(req); err != nil {
		return nil, err
	}

	var dialogueRes DialogueResponse
	res, err := d.client.post(d.ctx, DialogueURL, "application/json", bytes.NewReader(data), &dialogueRes)
	if err != nil {
		return nil, err
	}

	defer res.Body.Close()

	if refreshContext {
		d.SetContext(dialogueRes.Context)
	}

	return &dialogueRes, nil
}
917867
func (s *ServicesService) GetWithContext(ctx context.Context, idOrName string) (*Service, *http.Response, error) {
	resource, _ := url.Parse(servicesResourcePath)
	resource.Path = path.Join(resource.Path, idOrName)

	req, err := s.client.NewRequest(ctx, http.MethodGet, resource, nil)

	if err != nil {
		return nil, nil, err
	}

	svc := new(Service)

	res, err := s.client.Do(req, svc)

	if err != nil {
		return nil, res, err
	}

	return svc, res, nil
}
923137
func (i *Info) Refresh(obj runtime.Object, ignoreError bool) error {
	name, err := metadataAccessor.Name(obj)
	if err != nil {
		if !ignoreError {
			return err
		}
	} else {
		i.Name = name
	}
	namespace, err := metadataAccessor.Namespace(obj)
	if err != nil {
		if !ignoreError {
			return err
		}
	} else {
		i.Namespace = namespace
	}
	version, err := metadataAccessor.ResourceVersion(obj)
	if err != nil {
		if !ignoreError {
			return err
		}
	} else {
		i.ResourceVersion = version
	}
	i.Object = obj
	return nil
}
897249
func (c *upgradeContext) APIContext() Context {
	return &upgradeContext{
		agentConfig: c.agentConfig,
		api:         c.api,
	}
}
641561
func (context *BaseContext) Get(key string) interface{} {
	if value, ok := context.userData[key]; ok {
		return value
	}
	return nil
}
239101
func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService {
	s.searchSource = s.searchSource.FetchSourceContext(fetchSourceContext)
	return s
}
302007
func (s *UpdateByQueryService) Refresh(refresh string) *UpdateByQueryService {
	s.refresh = refresh
	return s
}
147440
func (mig *modelMigration) Refresh() error {
	// Only the status document is updated. The modelMigDoc is static
	// after creation.
	statusColl, closer := mig.st.db().GetCollection(migrationsStatusC)
	defer closer()
	var statusDoc modelMigStatusDoc
	err := statusColl.FindId(mig.doc.Id).One(&statusDoc)
	if err == mgo.ErrNotFound {
		return errors.NotFoundf("migration status")
	} else if err != nil {
		return errors.Annotate(err, "migration status lookup failed")
	}

	mig.statusDoc = statusDoc
	return nil
}
100717
func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource {
	s.fetchSourceContext = fetchSourceContext
	return s
}
282679
func (c *Client) Fetch(req *Request) (*Response, error) {
	return c.FetchContext(context.Background(), req)
}
507311
func Get(r *http.Request) *Context {

	// get the context bound to the http.Request
	if v, ok := r.Body.(*wrapper); ok {
		return v.context
	}

	// create a new context
	c := Context{ }
	c.Params = make(Params)
	c.Values = make(Values)
	c.req = r

	// wrap the request and bind the context
	wrapper := wrap(r)
	wrapper.context = &c
	return &c
}
771987
func (c *Charm) Refresh() error {
	ch, err := c.st.Charm(c.doc.URL)
	if err != nil {
		return errors.Trace(err)
	}
	c.doc = ch.doc
	return nil
}
768479
func Get(req *http.Request, key interface{}) interface{} {
	crc := getContextReadCloser(req)
	return crc.Context()[key]
}
557180
func (cg *ContextGroup) GET(path string, handler http.HandlerFunc) {
	cg.Handle("GET", path, handler)
}
390195
func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
	spt.refreshLock.Lock()
	defer spt.refreshLock.Unlock()
	return spt.refreshInternal(ctx, resource)
}
1212511
func (s *ServicesService) Get(idOrName string) (*Service, *http.Response, error) {
	return s.GetWithContext(context.TODO(), idOrName)
}
244942
func (r *ReindexSource) FetchSourceContext(fsc *FetchSourceContext) *ReindexSource {
	r.request = r.request.FetchSourceContext(fsc)
	return r
}