Please propose design patterns and desired functionality for the next version of the JavaSDK
In the initial pass I'm just pulling from the twilio SDK I figure they've thought a lot more about this than I have
403 Forbidden | |
Content-Type: application/json | |
{ | |
"category": "limit", | |
"code": "message-rate-limit", | |
"message": "You can send 1 messages per 1 seconds, calculated as the average over 10 seconds. Your rate is: 1.1", | |
"details": [ | |
{ | |
"name": "requestMethod", | |
"value": "POST" |
Type | Count | Period (sec) | Sample Period (sec) |
---|---|---|---|
Outbound Message Per Number | 1 | 1 | 10 |
Outbound Messages Per Account | ∞ | ∞ | ∞ |
Outbound Calls Per Number | 1 | 1 | 10 |
Outbound Calls Per Account | 1 | 1 | 10 |
403 Forbidden | |
Content-Type: application/json | |
{ | |
"category": "limit", | |
"code": "call-rate-limit", | |
"message": "You can create 1 calls per 1 seconds, calculated as the average over 10 seconds. Your rate is: 1.1", | |
"details": [ | |
{ | |
"name": "requestMethod", | |
"value": "POST" |
Code | Message |
---|---|
message-rate-limit | You can send 1 messages per 1 seconds calculated as the average over 10 seconds. Your rate is: <limit> |
call-rate-limit | You can create 1 calls per 1 seconds calculated as the average over 10 seconds. Your rate is: <limit> |
response = request.post(msg_url); | |
if (response.status == 403 && response.body.code == ‘message-rate-limit’) { | |
error(‘Rate Limit for messages hit’); | |
wait(sample_period); | |
retry(msg_url); | |
} |
POST /v1/users/{userId}/bridges | |
{ | |
“bridgeAudio”: “true” | |
} | |
HTTP/1.1 201 Created | |
Location: /v1/users/{userId}/bridges/{bridgeId} |
public interface EmployeeRepository extends CrudRepository<Employee, Integer> | |
{ | |
Employee findByFirstNameAndLastName(String firstName, String lastName); | |
List<Employee> findByOfficeCountryNot(String country); | |
} |
select ... | |
from employees employee0_ | |
where employee0_.firstName=? and employee0_.lastName=? |
select ... | |
from employees employee0_ | |
left outer join offices office1_ on employee0_.officeCode=office1_.officeCode | |
where office1_.country<>? |