Package com.cloudinary.Api

Examples of com.cloudinary.Api.ApiResponse


  }
 
  @Test
  public void testApiLimits() throws Exception {
    // should support reporting the current API limits found in the response header
    ApiResponse result1 = api.transformations(Cloudinary.emptyMap());
    ApiResponse result2 = api.transformations(Cloudinary.emptyMap());
    assertNotNull(result1.apiRateLimit());
    assertNotNull(result2.apiRateLimit());
    assertEquals(result1.apiRateLimit().getRemaining() - 1, result2.apiRateLimit().getRemaining());
    assertTrue(result2.apiRateLimit().getLimit() > result2.apiRateLimit().getRemaining());
    assertEquals(result1.apiRateLimit().getLimit(), result2.apiRateLimit().getLimit());
    assertEquals(result1.apiRateLimit().getReset(), result2.apiRateLimit().getReset());
    assertTrue(result2.apiRateLimit().getReset().after(new java.util.Date()));
  }
View Full Code Here

TOP

Related Classes of com.cloudinary.Api.ApiResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.