@geimaj/zaio-property24-api
Property24 API
Last updated 3 months ago by geimaj .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @geimaj/zaio-property24-api 
SYNC missed versions from official npm registry.

Property24 API

Publish to NPM

To install:

npm install @geimaj/zaio-property24-api

To use:

User

import { User } from "zaio-property24-api/api/User";

//signup
new User(
    "username",
    "password",
    "fullname",
    "email"
    )
    .signup()
    .then(user => {
        console.log(user)
    })
    .catch(err => {
        console.log(err)
    })

//login
new User("username","password")
    .login()
    .then(...)
    .catch(...)

Property

import { Property } from "zaio-property24-api/api/Property";

//fetch all properties
Property
    .getAll()
    .then(properties => {
        console.log(properties)
    })
    .catch(err => {
        console.log(err)
    })

//delete property
Property.delete(property.id).then(...).catch(...)

//create new property
new Property(
        "main street", //street
        5, //number
        2, //beds
        2, //baths
        100000, //price
        ["https://image1.com", "https://image2.com"], //images
        7500 //postCode,
        "Country cottage" //name
    )
    .save()
    .then(...)
    .catch(...)

//update property
new Property(street, number, beds, baths, price)
    .update(id)
    .then(...)
    .catch(...)

//get app properties posted by a particular user
Property.getAllForUser(user.id).then(....)

//search properties by name
Property.getAllByName("beach villa").then(...)

Current Tags

  • 0.0.3                                ...           latest (3 months ago)

4 Versions

  • 0.0.3                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
  • 0.0.1                                ...           3 months ago
  • 0.0.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 4
Last Month 1
Dependencies (11)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |