Skip to main content

Librería para transferir información entre API Intercambiador y las fuentes de datos.

Project description

Intercambiador-API-Integrate-Python

Installation

pip install apiintercambiador

Usage

from apiintercambiador import Apiintercambiador

ai = Apiintercambiador("token", True) # True = sandbox

GET

result = ai.getProperties()

POST

data = [
    {
        "fuente_origen"=> "1123123",
         "agency_id"=> "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiV2VkIEp1biAwOCAyMDIyIDEwOjM5OjE2IEdNVCswMjAwIChob3JhIGRlIHZlcmFubyBkZSBFdXJvcGEgY2VudHJhbCkiLCJ1c2VySWQiOiI2Mjk0YmM3ZGU1ODVlODhiODYxNzYzZDAiLCJpYXQiOjE2NTQ2Nzc1NTZ9.0xFLIf631G7PbXEL_ef04O3w6gjnu8lZ-gExsR9Wfto",
         "reference"=> "11905-OB",
         "status_id"=> "1",
         "status_property_id"=> "1",
         "property_type_id"=> "8",
         "property_subtype_id"=> "2",
         "visibility_type_id"=> "2",
         "cadastral_reference"=> "9015608DF2891E0017AL",
         "price_sale"=> null,
         "price_rent"=> 95,
         "community_costs"=> "",
         "ibi_costs"=> "",
         "traspass"=> "",
         "orientation_id"=> "6",
         "energy_clasification_id"=> "6",
         "co2_release_class_id"=> "2",
         "conservation_state_id"=> "4",
    },
    {
        "fuente_origen"=> "1123123",
         "agency_id"=> "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiV2VkIEp1biAwOCAyMDIyIDEwOjM5OjE2IEdNVCswMjAwIChob3JhIGRlIHZlcmFubyBkZSBFdXJvcGEgY2VudHJhbCkiLCJ1c2VySWQiOiI2Mjk0YmM3ZGU1ODVlODhiODYxNzYzZDAiLCJpYXQiOjE2NTQ2Nzc1NTZ9.0xFLIf631G7PbXEL_ef04O3w6gjnu8lZ-gExsR9Wfto",
         "reference"=> "11906-OB",
         "status_id"=> "1",
         "status_property_id"=> "1",
         "property_type_id"=> "8",
         "property_subtype_id"=> "2",
         "visibility_type_id"=> "2",
         "cadastral_reference"=> "9015608DF2891E0018AL",
         "price_sale"=> null,
         "price_rent"=> 195,
         "community_costs"=> "",
         "ibi_costs"=> "",
         "traspass"=> "",
         "orientation_id"=> "6",
         "energy_clasification_id"=> "6",
         "co2_release_class_id"=> "2",
         "conservation_state_id"=> "4",
    }
]
result = ai.addProperty(data)

PUT

data = [
    {
        "property_id"=> "62aafcb53e575f7b21a16dfd",
        "fuente_origen"=> "1123123",
         "agency_id"=> "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiV2VkIEp1biAwOCAyMDIyIDEwOjM5OjE2IEdNVCswMjAwIChob3JhIGRlIHZlcmFubyBkZSBFdXJvcGEgY2VudHJhbCkiLCJ1c2VySWQiOiI2Mjk0YmM3ZGU1ODVlODhiODYxNzYzZDAiLCJpYXQiOjE2NTQ2Nzc1NTZ9.0xFLIf631G7PbXEL_ef04O3w6gjnu8lZ-gExsR9Wfto",
         "reference"=> "11905-OB",
         "status_id"=> "1",
         "status_property_id"=> "1",
         "property_type_id"=> "8",
         "property_subtype_id"=> "2",
         "visibility_type_id"=> "2",
         "cadastral_reference"=> "9015608DF2891E0017AL",
         "price_sale"=> null,
         "price_rent"=> 95,
         "community_costs"=> "",
         "ibi_costs"=> "",
         "traspass"=> "",
         "orientation_id"=> "6",
         "energy_clasification_id"=> "6",
         "co2_release_class_id"=> "2",
         "conservation_state_id"=> "4",
    },
    {
        "property_id"=> "62aafcb53e575f7b21a16dfe",
        "fuente_origen"=> "1123123",
         "agency_id"=> "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiV2VkIEp1biAwOCAyMDIyIDEwOjM5OjE2IEdNVCswMjAwIChob3JhIGRlIHZlcmFubyBkZSBFdXJvcGEgY2VudHJhbCkiLCJ1c2VySWQiOiI2Mjk0YmM3ZGU1ODVlODhiODYxNzYzZDAiLCJpYXQiOjE2NTQ2Nzc1NTZ9.0xFLIf631G7PbXEL_ef04O3w6gjnu8lZ-gExsR9Wfto",
         "reference"=> "11906-OB",
         "status_id"=> "1",
         "status_property_id"=> "1",
         "property_type_id"=> "8",
         "property_subtype_id"=> "2",
         "visibility_type_id"=> "2",
         "cadastral_reference"=> "9015608DF2891E0018AL",
         "price_sale"=> null,
         "price_rent"=> 195,
         "community_costs"=> "",
         "ibi_costs"=> "",
         "traspass"=> "",
         "orientation_id"=> "6",
         "energy_clasification_id"=> "6",
         "co2_release_class_id"=> "2",
         "conservation_state_id"=> "4",
    }
]
result = ai.updateProperty(data)

DELETE

data = ["62aafcb53e575f7b21a16dfd"]

result = ai.deleteProperty(data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apiintercambiador-0.0.4.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apiintercambiador-0.0.4-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file apiintercambiador-0.0.4.tar.gz.

File metadata

  • Download URL: apiintercambiador-0.0.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.9

File hashes

Hashes for apiintercambiador-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4edfd029f39d41631b574cb9c19947bb5d5263ad192e04835a6a232c43941d98
MD5 9e36d5dd049408c0357bd0f538c124c4
BLAKE2b-256 4aa8da7fa639cd30eb6f25adac7c36c9701a8acd2a5e7c7c81674a1f5e6efbcc

See more details on using hashes here.

File details

Details for the file apiintercambiador-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for apiintercambiador-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f76868519843cdc3d34fa3de6bbc8b0bed836e0c81e15d5b5a601452c2b44112
MD5 40bd8db6b3c4ae9e509c5d47e85fa2d6
BLAKE2b-256 cb9f93c80d42de2ec222a962a2da4582d236083ea7af2e938314a31c6d44b78d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page