Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jessebyarugaba/Unofficial-Uganda-Securities-Exhange-API/llms.txt
Use this file to discover all available pages before exploring further.
Welcome contributors
Contributions are welcome and encouraged! This library is an open-source project that benefits from community input. Whether you’re fixing bugs, adding features, improving documentation, or sharing ideas, your contributions help make this library better for everyone.The project maintainer welcomes contributions on how to make it better or any ideas for further implementation.
Ways to contribute
There are many ways you can contribute to this project:- Report bugs - Found an issue? Let us know
- Suggest features - Have an idea for improvement? Share it
- Fix issues - Submit pull requests for known bugs
- Add features - Implement new functionality
- Improve documentation - Help others understand and use the library
- Write tests - Increase code reliability and coverage
- Share use cases - Show others how you’re using the library
Getting started
Prerequisites
Before contributing, ensure you have:- PHP >= 5.6 installed
- Composer for dependency management
- A local web server (XAMPP, WAMP, or any PHP server)
- Git for version control
- A GitHub account
Setting up your development environment
Step 1: Fork and clone the repository
Step 1: Fork and clone the repository
- Fork the repository on GitHub
- Clone your fork to your local machine:
- Add the upstream repository:
Step 2: Install dependencies
Step 2: Install dependencies
Install project dependencies using Composer:This will install the Simple HTML DOM Parser and other required packages.
Step 3: Start your development server
Step 3: Start your development server
Start your local PHP server:Using XAMPP/WAMP:
- Place the project in your htdocs/www directory
- Start Apache from the control panel
- Access via http://localhost/project-name
Step 4: Test the API
Step 4: Test the API
Open
PortfolioManager.php and uncomment the example usage at the bottom to test API features:Making changes
Creating a new branch
Always create a new branch for your changes:feature/- New features or enhancementsfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoring
Code style guidelines
Follow PHP best practices and maintain consistency with the existing codebase.
-
Use meaningful variable names
-
Add comments for complex logic
-
Always clean up DOM objects
-
Handle errors gracefully
- Use consistent indentation (4 spaces)
-
Include PHPDoc comments for functions
Testing your changes
Before submitting your contribution:-
Test all affected functionality
- Run existing test cases if available
- Manually test your changes
- Verify no existing functionality breaks
-
Test with different scenarios
- Valid inputs
- Invalid inputs
- Edge cases
- Error conditions
-
Check for memory leaks
-
Verify cross-PHP version compatibility
- Test with PHP 5.6+ if possible
- Avoid using features from newer PHP versions without checking compatibility
Submitting your contribution
Commit messages
Write clear, descriptive commit messages:Creating a pull request
Step 1: Push your changes
Step 1: Push your changes
Step 2: Open a pull request on GitHub
Step 2: Open a pull request on GitHub
- Navigate to your fork on GitHub
- Click “Compare & pull request”
- Select the base repository and branch (usually
main) - Fill out the pull request template
Step 3: Describe your changes
Step 3: Describe your changes
Include in your PR description:
- What changed: Brief summary of modifications
- Why: Reasoning behind the changes
- Testing: How you tested the changes
- Screenshots: If applicable (for UI changes)
- Related issues: Link to any related issues
Types of contributions
Feature enhancements
Ideas for new features:- Additional data endpoints from the USE website
- Caching mechanism to reduce server load
- Support for historical data analysis
- Rate limiting and retry logic
- WebSocket support for real-time updates
- Database integration examples
- REST API wrapper for the library
Bug fixes
When fixing bugs:- Create an issue describing the bug (if one doesn’t exist)
- Reference the issue in your PR
- Include steps to reproduce the original bug
- Explain how your fix addresses the issue
Documentation improvements
Documentation contributions are highly valued:- Add examples for common use cases
- Clarify existing documentation
- Fix typos and grammatical errors
- Add code snippets and explanations
- Create tutorials or guides
- Translate documentation
Framework ports
The README mentions: “You can re-code it in any language/framework if you so deem necessary.”
-
Maintain core functionality:
- All existing methods (getAllPortfolioCompanies, getCompanyDetails, etc.)
- Same data structure in responses
- Similar error handling approach
- Create a separate repository for the port
- Link back to the original project in your documentation
- Share your port so others can benefit
- Python (using Beautiful Soup or Scrapy)
- JavaScript/Node.js (using Cheerio or Puppeteer)
- Ruby (using Nokogiri)
- Go (using goquery)
Code review process
After submitting a pull request:- Maintainer review - The project maintainer will review your changes
- Feedback - You may receive comments or requests for modifications
- Revisions - Make requested changes and push to your branch
- Approval - Once approved, your PR will be merged
Be patient and responsive during the review process. Constructive feedback helps improve code quality.
Community guidelines
Be respectful
- Treat all contributors with respect
- Provide constructive feedback
- Welcome newcomers and help them get started
- Focus on the code, not the person
Be collaborative
- Share knowledge and insights
- Credit others for their contributions
- Work together to solve problems
- Celebrate successes
Be professional
- Keep discussions on-topic
- Avoid spam or promotional content
- Respect intellectual property
- Follow ethical web scraping practices
Legal considerations
When contributing:- Respect copyright - Only contribute code you have the right to share
- Comply with terms of service - Ensure contributions don’t violate USE website ToS
- Document data sources - Clearly indicate where data comes from
- Include disclaimers - Remind users about approval requirements
Questions?
If you have questions about contributing:- Review this documentation
- Check existing issues and pull requests
- Look at the source code for examples
- Reach out to the project maintainer
Your contributions, no matter how small, make a difference. Thank you for helping improve this project!