Coder Social home page Coder Social logo

rapa's Introduction

ActiveResource  like RESTClient for java

Typical Usage:

All you need are the url, username, password, scheme and realm. You could choose to leave out properties like username, 
password, scheme and realm if not applicable

RestClient restClient = new RestClientBuilder().withUrl("http://localhost:8080/customers")
                                               .withUserName("username")
                                               .withPassword("password")
                                               .withBasicAuthentication()
                                               .withRealm("realm")
                                               .withFormatHandler(new JSonHandler())
                                               .build();

Create
------

Customer customer = new Customer();
customer.setName("Hari");
restClient.save(customer);

update: Thanks to Marlin Engel, the save now also sets the id on the resource. Keep watching this space for more updates.

Read
----

customer = (Customer) restClient.getById(1, Customer.class);

Update
------

customer.setName("rapa");
restClient.update(customer);

Delete
------

restClient.delete(customer);

Documentation
-------------

Take a look at the wiki pages for more information. We are making the api much more easy to use in the next release.
"Documentation":https://github.com/harikrishnan83/rapa/wiki/Documentation 

Gradle/Maven repository urls
----------------------------

pom.xml

  <repositories>
    <repository>
      <id>rapa</id>
      <url>https://github.com/harikrishnan83/maven-repository/raw/master/</url>
    </repository>
  </repositories>
  
  <dependencies>
    <dependency>
      <groupId>org.rest.rapa</groupId>
      <artifactId>rapa</artifactId>
      <version>0.9.1</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

gradle

  repositories {
      mavenRepo urls: 'https://github.com/harikrishnan83/maven-repository/raw/master/'
  }

  dependencies {
      compile 'org.rest.rapa:rapa:0.9.1'
  }

Contributing
------------

Use it and let us know your comments. As always your comments are most welcome.

If you want to be a contributor on this project send a mail to rapa-programmers at gmail dot com.

Check out the code to get a sneak peak of the improvements. We welcome critical feedback.
Quality

We strive to write better code and time to time try to better ourselves with review and metrics.

LICENSE
-------
 
Rapa is licensed under the Apache License, Version 2.0 (the "License")

rapa's People

Contributors

harikrishnan83 avatar venkatrs avatar saivenkat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.