|
1 |
| -# SPINEN's ConnectWise API PHP Wrapper |
| 1 | +# SPINEN's ConnectWise API Clients Generator |
2 | 2 |
|
3 |
| -[](https://packagist.org/packages/spinen/connectwise-php-generator) |
4 |
| -[](https://packagist.org/packages/spinen/connectwise-php-generator) |
5 |
| -[](https://packagist.org/packages/spinen/connectwise-php-generator) |
6 |
| -[](https://www.versioneye.com/php/spinen:laravel-garbage-man/0.1.1) |
7 |
| -[](https://packagist.org/packages/spinen/connectwise-php-generator) |
| 3 | +Generate php clients from ConnectWise's swagger documents for their REST API. |
8 | 4 |
|
9 |
| -Generate a php soap client for the ConnectWise WSDL API's. This repository generates the library & has an example client that consumes the library. The documentation for the API is located at [http://developer.connectwise.com](http://developer.connectwise.com). |
| 5 | +Each api is built into it's own client. |
10 | 6 |
|
11 |
| -## Client & Library |
| 7 | +## Clients |
12 | 8 |
|
13 |
| -Both the library & client are subsplit off into read-only repositories: |
| 9 | +* [Company API Client](http://github.com/spinen/connectwise-company-php-client) |
| 10 | +* [Expense API Client](http://github.com/spinen/connectwise-expense-php-client) |
| 11 | +* [Finance API Client](http://github.com/spinen/connectwise-finance-php-client) |
| 12 | +* [Marketing API Client](http://github.com/spinen/connectwise-marketing-php-client) |
| 13 | +* [Mobile API Client](http://github.com/spinen/connectwise-mobile-php-client) |
| 14 | +* [Procurement API Client](http://github.com/spinen/connectwise-procurement-php-client) |
| 15 | +* [Project API Client](http://github.com/spinen/connectwise-project-php-client) |
| 16 | +* [Sales API Client](http://github.com/spinen/connectwise-sales-php-client) |
| 17 | +* [Schedule API Client](http://github.com/spinen/connectwise-schedule-php-client) |
| 18 | +* [Service API Client](http://github.com/spinen/connectwise-service-php-client) |
| 19 | +* [System API Client](http://github.com/spinen/connectwise-system-php-client) |
| 20 | +* [Time API Client](http://github.com/spinen/connectwise-time-php-client) |
14 | 21 |
|
15 |
| -### SPINEN's ConnectWise Client |
| 22 | +## Build |
16 | 23 |
|
17 |
| -[https://github.com/spinen/connectwise-php-client](https://github.com/spinen/connectwise-php-client) |
| 24 | +You will probably not need to build the client, you can just use the generated. |
| 25 | +However, here are the steps to remind me how to do it... |
18 | 26 |
|
19 |
| -[](https://packagist.org/packages/spinen/connectwise-php-client) |
20 |
| -[](https://packagist.org/packages/spinen/connectwise-php-client) |
21 |
| -[](https://packagist.org/packages/spinen/connectwise-php-client) |
22 |
| -[](https://www.versioneye.com/php/spinen:laravel-garbage-man/0.1.1) |
23 |
| -[](https://packagist.org/packages/spinen/connectwise-php-client) |
24 |
| - |
25 |
| -### SPINEN's ConnectWise Library |
26 |
| - |
27 |
| -[https://github.com/spinen/connectwise-php-library](https://github.com/spinen/connectwise-php-library) |
28 |
| - |
29 |
| -[](https://packagist.org/packages/spinen/connectwise-php-library) |
30 |
| -[](https://packagist.org/packages/spinen/connectwise-php-library) |
31 |
| -[](https://packagist.org/packages/spinen/connectwise-php-library) |
32 |
| -[](https://www.versioneye.com/php/spinen:laravel-garbage-man/0.1.1) |
33 |
| -[](https://packagist.org/packages/spinen/connectwise-php-library) |
34 |
| - |
35 |
| -## Build Status |
36 |
| - |
37 |
| -| Branch | Status | Coverage | Code Quality | |
38 |
| -| ------ | :----: | :------: | :----------: | |
39 |
| -| Develop | [](https://travis-ci.org/spinen/connectwise-php-generator) | [](https://coveralls.io/github/spinen/connectwise-php-generator?branch=develop) | [](https://scrutinizer-ci.com/g/spinen/connectwise-php-generator/?branch=develop) | |
40 |
| -| Master | [](https://travis-ci.org/spinen/connectwise-php-generator) | [](https://coveralls.io/github/spinen/connectwise-php-generator?branch=master) | [](https://scrutinizer-ci.com/g/spinen/connectwise-php-generator/?branch=master) | |
41 |
| - |
42 |
| -## List of available Soap Endpoints (2.0) |
43 |
| - |
44 |
| -You can see all of the WSDL's at [https://developer.connectwise.com/SOAP_Endpoints](https://developer.connectwise.com/SOAP_Endpoints). |
45 |
| - |
46 |
| -| API Name | WSDL URI | |
47 |
| -|:-----|:----| |
48 |
| -| Activity API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ActivityApi.asmx?wsdl | |
49 |
| -| Agreement API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/AgreementApi.asmx?wsdl | |
50 |
| -| Company API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/CompanyApi.asmx?wsdl | |
51 |
| -| Configuration API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ConfigurationAPI.asmx?wsdl | |
52 |
| -| Contact API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ContactApi.asmx?wsdl | |
53 |
| -| Document API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/DocumentApi.asmx?wsdl | |
54 |
| -| Invoice API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/InvoiceApi.asmx?wsdl | |
55 |
| -| Managed Device API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ManagedDeviceApi.asmx?wsdl | |
56 |
| -| Marketing API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/MarketingApi.asmx?wsdl | |
57 |
| -| Member API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/MemberApi.asmx?wsdl | |
58 |
| -| Opportunity API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/OpportunityApi.asmx?wsdl | |
59 |
| -| Opportunity Conversion API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/OpportunityConversionApi.asmx?wsdl | |
60 |
| -| Product API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ProductApi.asmx?wsdl | |
61 |
| -| Project API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ProjectApi.asmx?wsdl | |
62 |
| -| Purchasing API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/PurchasingApi.asmx?wsdl | |
63 |
| -| Reporting API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ReportingApi.asmx?wsdl | |
64 |
| -| Scheduling API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/SchedulingApi.asmx?wsdl | |
65 |
| -| Service Ticket API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/ServiceTicketApi.asmx?wsdl | |
66 |
| -| System API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/SystemApi.asmx?wsdl | |
67 |
| -| Time Entry API | https://<ConnectWiseSite>/v4_6_release/apis/2.0/TimeEntryApi.asmx?wsdl | |
68 |
| - |
69 |
| -## Library used to automatically create wrapper |
70 |
| - |
71 |
| -I am using wsdl2phpgenerator [https://github.com/wsdl2phpgenerator/wsdl2phpgenerator](https://github.com/wsdl2phpgenerator/wsdl2phpgenerator). |
72 |
| - |
73 |
| -## Generate the wrappers |
74 |
| - |
75 |
| -You need to copy .env.example to .env & add fill in the correct values for your installation. |
76 |
| - |
77 |
| -## TL;DR; |
78 |
| - |
79 |
| -```bash |
80 |
| -$ ./generator makeLibraries; |
81 |
| -$ # Getting a namespace error on fresh generate, so manually run these steps below |
82 |
| -$ composer dumpauto -o |
83 |
| -$ ./generator refactorCode; |
84 |
| -$ ./generator formatCode; |
85 |
| -$ ./generator addTypeHints; |
86 |
| -$ ./generator buildSignatures; |
87 |
| -``` |
| 27 | +1. `mkdir -p swagger/specs` |
| 28 | +2. Download the specs into above folder |
| 29 | +3. Download [Swagger Code Generator](https://github.com/swagger-api/swagger-codegen) in the swagger folder |
| 30 | +4. Compile the jar with docker mvn image |
| 31 | +5. Run the generator `./generate.sh` |
0 commit comments