Having a framework for managing your API code samples and libraries is essential to providing partners and developers with relevant, useful and functional code they can use to integrate with your API.
First start by breaking down your code into relevant projects that address specific types of integration with your API.
Within each project you can create an appropriate title and description and set some goals for the project.
Then build your code samples that satisfy the project goals. After organizing and documenting all code samples, publish them to:
GIT - Github is a git based repository service and social coding service.
Both GitHub and Google Project Hosting provide methods for you to manage your code in two popular version control formats. This will allow API developers and partners to quickly check out code repositories, stay current with updates, and even contribute back to your API code projects.
Publishing your code to GitHub and Google Project hosting will also provide added marketing benefits to your API community, by extending its reach beyond your domain into existing popular social code communities and the open Internet.
Make sure and spend time to choose the proper open source licensing model for your code projects.
Now you have a solid process for managing all your API code that makes them accessible in popular developer communities, your API area, and widely available on the open Internet.