GithubHelp home page GithubHelp logo

mkesicki / api2word Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.48 MB

Export Postman documentation (via Postman API) to Word.

License: MIT License

C# 66.98% PowerShell 33.02%
csharp postman postman-export word postman-word postman-docs api-docs api-word api-documentation

api2word's Introduction

API2Word

This is simple C# script to parse Postman Collection (via their API) and store it to Word (.docx) file. It is super basic and far from perfect ... and yes I am not C# developer (this is why I chose this language to play). Feel free to play, change, complain and improve ... please note this script is as it is and there is no warranty :)

Why Word

I needed (for work) to store documentation from Postman in Word and after a lot of copy & pasting I decided ... never again :)

Yes, I know, Postman team is working to prepare export of docs to PDF and there are other scripts which do similar things.

Used Packages

  • DocX
  • RestSharp
  • YamlDotNet

Usage

$ ./Api2Word.exe
You need to pass 3 parameters:
collection type
path to config file
name of Collection to parse
$ ./Api2Word.exe postman "..\..\config\config.yaml" "DocuWare REST Samples" Word

Example response

Read Config File: "..\..\config\config.yaml"
Get collection: DocuWare REST Samples
Found collection ID: 00a42a46-d8b3-4437-996a-e8a0443ffeca
Search for collection with id: 00a42a46-d8b3-4437-996a-e8a0443ffeca
Number of collections' endpoints: 10
Create file: D:\api2word\Api2Word\bin\Debug\results\DocuWare REST Samples.docx
Get list of endpoints
Parse endpoint: Forms Authentication
Endpoint response: Response OK
Endpoint response: Response 401 Unathorized
Parse endpoint: Get organization
Endpoint response: Response
Parse endpoint: Get all file cabinets and baskets
Endpoint response: Response
Parse endpoint: Get all data for a file cabinet (e.g fields)
Parse endpoint: Check-in a particular document from file system
Parse endpoint: Check-out a particular document and download it
Endpoint response: Response
Parse endpoint: Download thumbnail
Parse endpoint: Download document
Parse endpoint: Get documents from a file cabinet
Parse endpoint: Get first 5 documents from a file cabinet
Endpoint response: Response
Parse endpoint: Get first document from a file cabinet with two fields only
Endpoint response: Response
Parse endpoint: Get a particular document
Endpoint response: Response
Parse endpoint: Get all dialogs of the file cabinet
Endpoint response: Response
Parse endpoint: Get the search dialog
Endpoint response: Response
Parse endpoint: Get total amount of documents
Parse endpoint: Get all dialogs of the file cabinet
Endpoint response: Response
Parse endpoint: Get the search dialog
Endpoint response: Response
Parse endpoint: Build the URL to use in GET request
Endpoint response: Created URL
Parse endpoint: Use generated URL
Parse endpoint: Get a particular document
Endpoint response: Response
Parse endpoint: Update index values (JSON)
Endpoint response: Response
Parse endpoint: Update index values (XML)
Endpoint response: Response
Parse endpoint: Create a new document in a file cabinet
Parse endpoint: Upload  a single pdf document
Endpoint response: Response
Save file: XXX\results\DocuWare REST Samples.docx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.