Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service account example #34

Merged
merged 3 commits into from
Sep 25, 2016
Merged

Add service account example #34

merged 3 commits into from
Sep 25, 2016

Conversation

dermesser
Copy link
Owner

(I'm still creating PRs so you know what's going on -- otherwise I can just push directly)

Please note that I specified version 0.9.4 in the example crate
(anticipating the version bump)
Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dermesser, just my two cents. Please feel free to merge :).

fn publish_stuff(methods: &PubsubMethods, message: &str) {
check_or_create_topic(&methods);

let message = pubsub::PubsubMessage {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this also be the following ?

let message = pubsub::PubsubMessage {
     // Base64 encoded!
    data: Some(base64::encode(message.as_bytes())),
    ...Default::default()
};

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point!

match result {
Err(e) => {
// There's a JSON decode error happening, even on successful returns. :/
println!("Ack error: {:?}", e);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe a problem in the code generated by google-apis-rs ? Or already fixed thanks to the empty-structs PR recently submitted ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the empty-structs PR has fixed this. Forgot to remove the comment though

@dermesser
Copy link
Owner Author

I addressed your points. I'll go ahead and use my newly acquired privilege, and merge this PR then :)

@dermesser dermesser merged commit 8d9c42c into dermesser:master Sep 25, 2016
@Byron Byron removed the in progress label Sep 25, 2016
@Byron
Copy link
Collaborator

Byron commented Sep 25, 2016

@dermesser Congratulations ! And thank you ! Just a moment ago I used the youtube command-line, not knowing what I was doing at all. The authentication was easy as pie, and the CLI program actually helped me to figure out what kind of information it needed. It's way nicer than I had it in mind, and quite ready for general consumption I believe. Also thanks to you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants