github.com/twilio/twilio-go@v1.20.1/rest/studio/v2/flows_executions_steps_context.go (about) 1 /* 2 * This code was generated by 3 * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 * 7 * Twilio - Studio 8 * This is the public Twilio REST API. 9 * 10 * NOTE: This class is auto generated by OpenAPI Generator. 11 * https://openapi-generator.tech 12 * Do not edit the class manually. 13 */ 14 15 package openapi 16 17 import ( 18 "encoding/json" 19 "net/url" 20 "strings" 21 ) 22 23 // Retrieve the context for an Execution Step. 24 func (c *ApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV2ExecutionStepContext, error) { 25 path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" 26 path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) 27 path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) 28 path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) 29 30 data := url.Values{} 31 headers := make(map[string]interface{}) 32 33 resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) 34 if err != nil { 35 return nil, err 36 } 37 38 defer resp.Body.Close() 39 40 ps := &StudioV2ExecutionStepContext{} 41 if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { 42 return nil, err 43 } 44 45 return ps, err 46 }