Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
rets-rabbit-angular
Advanced tools
This is an angular module which provides several factories and services to interface with the Retsrabbit V2 API
This is an angular module which provides a variety of factories and services which hit the Rets Rabbit API
You can install this package via bower
$ bower install rets-rabbit-angular
This package comes with several factories:
This factory has two publicly available methods:
RRAuthFactory.getTokenV1().then(function (res){
//getToken automatically saves the access_token in localStorage
var token = res.access_token;
//do stuff with token
}, function (err){
//handle error
});
RRAuthFactory.getTokenV2().then(function (res){
//getToken automatically saves the access_token in localStorage
var token = res.access_token;
//do stuff with token
}, function (err){
//handle error
});
This factory has three public methods:
PropertyFactoryV1.metadata('somehashstring').then(function (res) {
//show metadata
}, function (err) {
//handle err
});
PropertyFactoryV1.servers().then(function (res) {
//show servers
}, function (err) {
//handle error
});
This factory has three publicly available methods:
var query = "$select=ListPrice, ListingId, OriginalListPrice&$filter=ListPrice gt OriginalListPrice&$orderby=ListPrice asc";
PropertyFactoryV2.search(query).then(function (res){
var total_count = res['@retsrabbit.total_results'];
var count = res['@odata.count'];
var results = res.value;
//do awesome things with results
}, function (err){
//handle error
});
var id = '1234';
var query = '$select=ListPrice, ListAgentFirstName';
PropertyFactoryV2.findOne(id, query).then(function(listing) {
//show off the listing
}, function (err) {
//handle error
});
PropertyFactoryV2.metadata().then(function (res) {
//do things with metadata
}, function (err) {
//handle error
});
This package comes with one provider:
This provider has two different classes to handle setting the V1 and V2 config values. To access either class, you just need to append v1
or v2
to the provider.
This provider has several setters which can be used to configure the service inside of an angular config module.
setBaseUrl: Used to set the base url for querying. For example, https://api.retsrabbit.com/
setApiEndPoint: Used to set the specific versioning. For example, api/v2
setClientId: Used to set the client_id which can be found under the API page on the Retsrabbit dashboard
setClientSecret: Used to set the client_secret which can be found under the API page on the Retsrabbit dashboard
setStorageKey: Use to set the local storage key for the access_token sent back by the server.
An example of using the setters can be seen below.
Make sure you suffix the provider with the "Provider" keyword when injecting into a config module so that angular knows you are using it as a Provider and not a service/factory.
ApiConfigProvider.v1.setBaseUrl("https://api.retsrabbit.com/");
ApiConfigProvider.v1.setClientId("clientidgoeshere");
ApiConfigProvider.v1.setClientSecret("supersecretpassword");
ApiConfigProvider.v1.setStorageKey("access_token_v1");
The provider has several public getters which can be used to get api related information.
FAQs
This is an angular module which provides several factories and services to interface with the Retsrabbit V2 API
The npm package rets-rabbit-angular receives a total of 0 weekly downloads. As such, rets-rabbit-angular popularity was classified as not popular.
We found that rets-rabbit-angular demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.