Skip to content

joshturge/abnlookup

Repository files navigation

ABN Lookup Wrapper for Go

This wrapper attempts to provide a layer of abstraction from the ABN Lookup API.

All the ABN Lookup methods have been added although some have yet to be unit tested, check the table below for unit tested methods. This wrapper also provides functions that can validate both ABN and ACN numbers. These functions are exported and can be used independant of the package client. These functions are used by SearchByABN and SearchByACN to validate before sending a request to the ABN Lookup API.

All the following ABN Lookup endpoints have been implemented.

Usage

To use the package client, you need to register for a GUID (more info here). Once registered, you can create a new client. The client handles all requests going to the API and enables people to create there own requests making this client very extensible.

    client, err := abnlookup.NewClient("YOUR GUID", abnlookup.LogDiscard)
	if err != nil {
		// Handle error...
	}

With the client created you can then use the search methods already made, or create your own. Examples can be found in the examples directory.

Methods

Method Unit Test
SearchByABN Yes
SearchByASIC Yes
SearchByName Yes
SearchByFilters Yes

Todo

  • Add more methods for searching ✅
  • Add unit tests for methods ✅
  • Create a better naming convention for types ✅