Last active
August 21, 2017 18:13
-
-
Save batmany13/ec9750699569eae58ea46fe4fdc86cbc to your computer and use it in GitHub Desktop.
API Call to Synq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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