From ab1b64363094c61f8d024dcae0f6faaa94032efd Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 21 Mar 2017 23:11:15 -0700 Subject: [PATCH] Adds missing area API. --- api/operator_area.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/operator_area.go b/api/operator_area.go index bf4d2f849..7b0e461e9 100644 --- a/api/operator_area.go +++ b/api/operator_area.go @@ -100,6 +100,16 @@ func (op *Operator) AreaCreate(area *Area, q *WriteOptions) (string, *WriteMeta, return out.ID, wm, nil } +// AreaGet returns a single network area. +func (op *Operator) AreaGet(areaID string, q *QueryOptions) ([]*Area, *QueryMeta, error) { + var out []*Area + qm, err := op.c.query("/v1/operator/area/"+areaID, &out, q) + if err != nil { + return nil, nil, err + } + return out, qm, nil +} + // AreaList returns all the available network areas. func (op *Operator) AreaList(q *QueryOptions) ([]*Area, *QueryMeta, error) { var out []*Area