Skip to content

shanemort1982/cro-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRO API Testing Project

A simple web application to test the Companies Registration Office (CRO) API with a search interface. This project was developed using a test-driven development approach to ensure API functionality works correctly.

Features

  • Status check to verify if the CRO API services are running
  • Company search with various filtering options:
    • Search by company name or number
    • Filter by company type (companies, business names, or both)
    • Search type options (exact match, starts with, contains)
    • Address filtering
    • Pagination and sorting
  • Detailed company information view

Installation

  1. Clone the repository
  2. Create a virtual environment and activate it:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install the required packages:
    pip install -r requirements.txt
    

Usage

  1. Start the application:
    python app.py
    
  2. Open your browser and navigate to http://localhost:50187
  3. Use the search form to find companies and view their details

API Endpoints

The application interacts with the following CRO API endpoints:

  • Status Check: https://services.cro.ie/cws/status
  • Company Search: https://services.cro.ie/cws/companies?[parameters]
  • Company Details: https://services.cro.ie/cws/company/{company_number}/{company_bus_ind}

Testing

The project includes comprehensive tests for both the API client and the web application. To run the tests:

python -m pytest

API Limitations and Issues

  • The API requires at least 3 characters for company name searches
  • Either company name or company number must be provided for searches
  • The API has rate limiting, so excessive requests may be blocked
  • Authentication is done using Basic Auth with Base64 encoded credentials

License

This project is for demonstration purposes only.

Credits

Developed for the CRO API Testing Project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •