Skip to content

Commit

Permalink
Tidy up the code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulofdestiny committed Feb 27, 2017
1 parent f8ee71e commit f2d671a
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions opaws
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ post '/' => sub {
my $intent = $wscall->{request}->{intent}->{name};
my $slots = $wscall->{request}->{intent}->{slots};


#$log->debug("wscall: ". Dumper($wscall));

if ( $intent eq "cloneJob" ) {

my $src_host = $slots->{src}->{value};
Expand Down Expand Up @@ -124,7 +121,6 @@ sub cancel_job {
$response = (!$ret)? "I can not cancel job $job_id because it is not there" : "I can not cancel job $job_id because it is in state $job_state";
$log->debug("response: ".$response);
}

return $response;
}

Expand Down Expand Up @@ -233,28 +229,29 @@ sub generate_json_response {
return from_json($json);
}

sub generate_rss_json {
my $imput = shift;
my $json = '
[
{
"uid": "EXAMPLE_CHANNEL_MULTI_ITEM_JSON_TTS_1",
"updateDate": "2016-04-10T00:00:00.0Z",
"titleText": "Multi Item JSON (TTS)",
"mainText": "This channel has multiple TTS JSON items. This is the first item."
},
{
"uid": "EXAMPLE_CHANNEL_MULTI_ITEM_JSON_TTS_2",
"updateDate": "2016-04-10T00:00:00.0Z",
"titleText": "Multi Item JSON (TTS)",
"mainText": "This channel has multiple TTS JSON items. This is the second item."
}
]
';
return from_json($json);


}
## TODO: not_implemented right now

This comment has been minimized.

## the idea was to use the flash briefing skill instead of a custom skill
## but there was some issue on the amazon side
#sub generate_rss_json {
# my $input = shift;
# my $json = '
#[
# {
# "uid": "EXAMPLE_CHANNEL_MULTI_ITEM_JSON_TTS_1",
# "updateDate": "2016-04-10T00:00:00.0Z",
# "titleText": "Multi Item JSON (TTS)",
# "mainText": "This channel has multiple TTS JSON items. This is the first item."
# },
# {
# "uid": "EXAMPLE_CHANNEL_MULTI_ITEM_JSON_TTS_2",
# "updateDate": "2016-04-10T00:00:00.0Z",
# "titleText": "Multi Item JSON (TTS)",
# "mainText": "This channel has multiple TTS JSON items. This is the second item."
# }
#]
#';
# return from_json($json);
#}

app->secrets(["Skynet is comming! :)"]);
app->start;
Expand Down

0 comments on commit f2d671a

Please sign in to comment.