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

Implement Task Router API #55

Merged
merged 9 commits into from
Jan 19, 2017
Merged

Implement Task Router API #55

merged 9 commits into from
Jan 19, 2017

Conversation

enilsen16
Copy link
Contributor

@enilsen16 enilsen16 commented Oct 5, 2016

This is most likely going to take me a few days to implement.

  • Resources
    • Workspaces
    • Workers
    • Activities
    • TaskQueues
    • Workflows
    • Tasks
    • Statistics
    • Events
  • Add documentation
    • Squash Commits
  • Update Readme

Let me know if there's anything you think I am missing @danielberkompas.

@enilsen16 enilsen16 changed the title [WIP] Implement Task Router API Implement Task Router API Oct 7, 2016
@enilsen16
Copy link
Contributor Author

@danielberkompas If I understand correctly parent/1 is for adding into the path before the resource and children/1 is to add after the resource. Is that correct?

@danielberkompas
Copy link
Owner

@enilsen16 yes, that's correct.

@enilsen16
Copy link
Contributor Author

Alright, I need to go through and change some things before you merge this 😃

@@ -64,6 +63,17 @@ defmodule ExTwilio.UrlGenerator do
end
end

defp add_segements(url, module, id, options) do
Copy link
Owner

Choose a reason for hiding this comment

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

Should be add_segments

@@ -158,7 +173,11 @@ defmodule ExTwilio.UrlGenerator do

@spec infer_module(atom) :: atom
defp infer_module(atom) do
Copy link
Owner

Choose a reason for hiding this comment

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

Could do this with pattern matching.

defp infer_module(:workspace), do: ExTwilio.TaskRouter.Workspace
defp infer_module(atom) do
  Module.concat(ExTwilio, camelize(atom))
end

@enilsen16 enilsen16 changed the title Implement Task Router API [WIP] Implement Task Router API Nov 10, 2016
@@ -0,0 +1,21 @@
defmodule ExTwilio.TaskRouter.Activity do
@moduledoc """
Repersents the current status of your workers. Workers can only have a single activity at a time.
Copy link
Contributor

Choose a reason for hiding this comment

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

Repersents -> Represents

A Workspace is a container for your Tasks, Workers, TaskQueues, Workflows and Activities.
Each of these items exists within a single Workspace and will not be shared across Workspaces.

- [Twilio docs](https://www.twilio.com/docs/api/taskrouter/workflows)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the link should be: https://www.twilio.com/docs/api/taskrouter/workspaces


## Example

Sets the auth token to be XXX
Copy link
Contributor

Choose a reason for hiding this comment

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

This should refer to worker sid


## Example

Sets the auth token to be XXX
Copy link
Contributor

Choose a reason for hiding this comment

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

This should refer to workspace sid

@danielberkompas
Copy link
Owner

@enilsen16 is this still in progress? Need help with anything?

@enilsen16
Copy link
Contributor Author

I just haven't gotten around to finishing this (working on something else at work). I'll finish it this week though. Thanks @danielberkompas 😄

@enilsen16
Copy link
Contributor Author

@danielberkompas Let me know if there's anything else you like me to add or change. 😄

@enilsen16 enilsen16 changed the title [WIP] Implement Task Router API Implement Task Router API Jan 4, 2017
@danielberkompas
Copy link
Owner

@enilsen16 I'd like to see @joshuafleck's comments addressed and the build passing.

@enilsen16
Copy link
Contributor Author

Updated 😐

Dialyzer seems to be complaining. Any idea how to fix that error @danielberkompas?

Thanks!

@danielberkompas
Copy link
Owner

I'll take care of the dialyzer warnings myself. Thanks! ⭐

@danielberkompas danielberkompas merged commit a18dc26 into danielberkompas:master Jan 19, 2017
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