Created
July 1, 2017 06:43
-
-
Save odeke-em/737f88f0edbed70c9a40fbb607fe0915 to your computer and use it in GitHub Desktop.
Applying a promo code to your Uber account
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/orijtech/uber/v1" | |
) | |
func main() { | |
client, err := uber.NewClientFromOAuth2File(os.ExpandEnv("$HOME/.uber/credentials.json")) | |
if err != nil { | |
log.Fatal(err) | |
} | |
appliedPromoCode, err := client.ApplyPromoCode("uberd340ue") | |
if err != nil { | |
log.Fatal(err) | |
} | |
fmt.Printf("AppliedPromoCode: %#v\n", appliedPromoCode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment