Class LamlRepository
- java.lang.Object
-
- io.github.signalwirecommunity.repository.LamlRepository
-
- All Implemented Interfaces:
XMLInterface
public class LamlRepository extends java.lang.Object implements XMLInterface
-
-
Constructor Summary
Constructors Constructor Description LamlRepository(java.lang.String projectId, java.lang.String apiToken, java.lang.String spaceUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bin
create(java.lang.String name, java.lang.String contents)
Create an XML binSuccessResponse
delete(java.lang.String sid)
Delete an XML bin by IDBin
get(java.lang.String sid)
Retrieve a particular xml bin by IDLamlResponse
list()
Returns a list of your XML Bins.LamlResponse
list(java.lang.String friendlyName)
Get list of xml bins by friendly nameBin
update(java.lang.String sid, java.lang.String name, java.lang.String contents)
Update an XML by ID
-
-
-
Method Detail
-
list
public LamlResponse list()
Returns a list of your XML Bins. The Bins are returned sorted by creation date, with the most recent appearing first- Specified by:
list
in interfaceXMLInterface
- Returns:
- LamlResponse
-
list
public LamlResponse list(java.lang.String friendlyName)
Get list of xml bins by friendly name- Specified by:
list
in interfaceXMLInterface
- Parameters:
friendlyName
- name of xml to be queried- Returns:
- LamlResponse
-
create
public Bin create(java.lang.String name, java.lang.String contents) throws SignalWireException
Create an XML bin- Specified by:
create
in interfaceXMLInterface
- Throws:
SignalWireException
-
get
public Bin get(java.lang.String sid)
Retrieve a particular xml bin by ID- Specified by:
get
in interfaceXMLInterface
- Returns:
- Bin
-
update
public Bin update(java.lang.String sid, java.lang.String name, java.lang.String contents) throws SignalWireException
Update an XML by ID- Specified by:
update
in interfaceXMLInterface
- Parameters:
sid
- unique SID for the binname
- friendly name of the created bincontents
- full contents and xml values of the bin- Returns:
- Bin
- Throws:
SignalWireException
-
delete
public SuccessResponse delete(java.lang.String sid)
Delete an XML bin by ID- Specified by:
delete
in interfaceXMLInterface
- Parameters:
sid
- unique SID for the bin- Returns:
- SuccessResponse
-
-