Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dormilich/arin

Objects for use with the ARIN Registry-RWS.
https://github.com/dormilich/arin

composer

Last synced: about 3 hours ago
JSON representation

Objects for use with the ARIN Registry-RWS.

Awesome Lists containing this project

README

        

# ARIN objects

![Minimum PHP Version](https://img.shields.io/badge/php-≥%205.6-8892BF.svg)
![Build Status](https://img.shields.io/travis/Dormilich/arin/master.svg)
![License](https://img.shields.io/github/license/dormilich/arin.svg)

Objects for use with the ARIN Registry-RWS.

## Primary ARIN objects

These objects are meant to request or submit data using the API service.

### Customer

This object holds one-time customer data for use in a [Simple Reassignment](https://www.arin.net/resources/restfulmethods.html#netreassign).

### Org

This object holds organisational customer data for use in a [Detailed Reassignment](https://www.arin.net/resources/restfulmethods.html#netreassign).
It can be used for reallocations or reassignments where the Simple Reassignment does not cut it (e.g. abuse handling,
management of customer data), although it comes with some issues in your ARIN online account.

### Poc

The customer data to be used in `Org` objects or `Net` objects from a detailed reassignment.

The `Phone` payload may be used to add phone data to a `Poc` object.

### Delegation

Used for setting DNS data.

### Roa

The authentication data for [ARIN's RPKI implementation](https://www.arin.net/resources/rpki/).

### Ticket, Message

Read and answer ARIN tickets without logging into the ARIN online account.

## Response-only objects

### Error

The returned object when there was a problem with the request.

Note, for some errors (often for invalid URLs) the webservice may return a web page instead.

### TicketedRequest

The returned object when deleting a network.

### Collection

A container object for payloads. Used when searching for tickets/phone contacts.

## Basic payload methods

Building the object from XML
```php
// $xml may be a string, a SimpleXML object, a DOMDocument instance, or a DOM root element
$object = Payload::fromXML($xml);
```

Getting XML from the object
```php
$xml = $object->xmlSerialize(); // returns an XML string
```

Getting data into or out of the object
```php
$poc = new Poc;

// test if a certain property exists
$poc->has('city'); // true
isset($poc['city']);

// set a property's value
$poc->set('city', 'Chantilly'); // set the city value
$poc['city'] = 'Chantilly';

// get a property object
$poc->attr('city'); // an Element instance for the 'city' value
$poc['city'];

// get the property's value
$poc->get('city'); // 'Chantilly'
$poc['city']->getValue();

// access nested objects
$poc['country']['code2'] = 'US';
```

When you clone an object, all properties that are generated by ARIN (object handles, creation
dates, etc.) are removed from the copy.

## Links

- [ARIN Payload Documentation](https://www.arin.net/resources/restfulpayloads.html)