Skip to content

Conversation

@cmontella
Copy link
Contributor

No description provided.

cmontella added 30 commits July 30, 2017 11:54
This way you don't have to set it when attaching the watcher
…e/json-watcher

# Conflicts:
#	src/bin/main.rs
…e/http

# Conflicts:
#	src/bin/server.rs
#	src/watchers/mod.rs
…e/http

# Conflicts:
#	examples/test.eve
#	src/bin/server.rs
Copy link
Contributor

@joshuafcole joshuafcole left a comment

Choose a reason for hiding this comment

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

I haven't really looked through the http stuff yet but there's some work to do first

entity? = if eav = [#json/encode/entity] then "entity"
else ""
bind
encode <- [| children:
Copy link
Contributor

Choose a reason for hiding this comment

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

no pipe required when merging (you can't change the identity of an existing thing!)

encode = [#flatten]
[#json/encode/flatten record]
bind
encode <- [| children:
Copy link
Contributor

Choose a reason for hiding this comment

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

drop the pipe

Create a Groove user from the response

search
[#groove-profile json-object: profile]
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be #groove/profile?

end

search
[#groove-search query response: [body]]
Copy link
Contributor

Choose a reason for hiding this comment

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

#groove/search?

end

search
[#groove-get-song track response: [body]]
Copy link
Contributor

Choose a reason for hiding this comment

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

#groove/get-song?


### Bring it all together

Join all encoded avs into a compelte string
Copy link
Contributor

Choose a reason for hiding this comment

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

compelte

complete-av = [#json/encode/complete-av record]
target-record = [#json/encode/record record]
bind
[#string/join #json/encode/join-complete record with: ", " | strings: complete-av.json-string]
Copy link
Contributor

Choose a reason for hiding this comment

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

we can switch to gather/string-join now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had some issues getting it to work the way I expected. I think I need a description on the parameters.

runner.program.attach(Box::new(WebsocketClientWatcher::new(out.clone(), client_name)));
runner.program.attach(Box::new(ConsoleWatcher::new()));
runner.program.attach(Box::new(PanicWatcher::new()));
runner.program.attach(Box::new(JsonWatcher::new(outgoing.clone())));
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like it got added twice?

pub fn string_encode(params: Vec<&Internable>) -> Option<Internable> {
match params.as_slice() {
&[&Internable::String(ref text)] => Some(Internable::String(base64::encode(text.as_bytes()))),
_ => None
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably return numbers as a string of themselves here?

pub fn string_urlencode(params: Vec<&Internable>) -> Option<Internable> {
match params.as_slice() {
&[&Internable::String(ref text)] => Some(Internable::String(urlencoding::encode(text))),
_ => None
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably return numbers as a string of themselves here?

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.

3 participants