.. Couldn't think of a descriptive enough title. What I'm asking for is how do I do this?

I want the following 2 API calls

```
 GET /api/users/2/duels - returns all of the duels for user 2 
 GET /api/users/2 - returns the profile for user 2

```

Since PHP doesn't support method overloading, it isn't clear to me how to make this work.

Currently I have the function

```
 function get($id, $action){
      //returns data based on action and id
 }

```

And I can't just make

```
 function get($id){
      //returns profile based on id
 } 

```

because of said reasons. 

Any help is greatly appreciated!!!