Skip to content

Instantly share code, notes, and snippets.

@batmany13
Last active August 21, 2017 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save batmany13/ec9750699569eae58ea46fe4fdc86cbc to your computer and use it in GitHub Desktop.
Save batmany13/ec9750699569eae58ea46fe4fdc86cbc to your computer and use it in GitHub Desktop.
API Call to Synq
func (a *ApiCall) Call() error {
defer a.Save()
start := time.Now()
video, err := sApi.GetVideo(a.VideoId)
a.Taken = time.Since(start)
if err != nil {
a.Error = err.Error()
return err
}
a.Type = "/v1/video/details"
a.VideoId = video.Id
a.Video = video
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment