{"id":17057933,"url":"https://github.com/radumg/dynaweb","last_synced_at":"2025-04-12T17:44:27.140Z","repository":{"id":37885608,"uuid":"101232602","full_name":"radumg/DynaWeb","owner":"radumg","description":"DynaWeb is a Dynamo package providing support for interaction with the interwebz in general and with REST APIs in particular.","archived":false,"fork":false,"pushed_at":"2022-12-08T01:07:21.000Z","size":1907,"stargazers_count":43,"open_issues_count":16,"forks_count":15,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-26T12:04:19.889Z","etag":null,"topics":["csharp","dynamods","rest-api"],"latest_commit_sha":null,"homepage":"https://radumg.github.io/DynaWeb/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radumg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-23T23:14:46.000Z","updated_at":"2024-05-23T07:45:10.000Z","dependencies_parsed_at":"2023-01-25T02:30:39.522Z","dependency_job_id":null,"html_url":"https://github.com/radumg/DynaWeb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radumg%2FDynaWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radumg%2FDynaWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radumg%2FDynaWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radumg%2FDynaWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radumg","download_url":"https://codeload.github.com/radumg/DynaWeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609419,"owners_count":21132908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dynamods","rest-api"],"created_at":"2024-10-14T10:28:27.858Z","updated_at":"2025-04-12T17:44:27.118Z","avatar_url":"https://github.com/radumg.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynaWeb\n[![Build Status](https://travis-ci.org/radumg/DynaWeb.svg?branch=master)](https://travis-ci.org/radumg/DynaWeb) [![GitHub version](https://badge.fury.io/gh/radumg%2FDynaWeb.svg)](https://badge.fury.io/gh/radumg%2FDynaWeb) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/radumg/DynaWeb/blob/master/CONTRIBUTING.md) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/f482d6c8bb27468e916bba4471511615)](https://www.codacy.com/project/radugidei/DynaWeb/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=radumg/DynaWeb\u0026amp;utm_campaign=Badge_Grade_Dashboard)\n---\n__DynaWeb__ is a [Dynamo](http://www.dynamobim.org) package providing support for interaction with the interwebz in general and with REST APIs in particular.\n\n### What does it do ?\n\nIt helps you \n- retrieve (GET) stuff from the web\n- send (POST) information to the web\n- everything in between (PUT, DELETE, PATCH, etc).\n- the package also includes some rather nifty JSON `de/serialisation` nodes, so you can use the information you get from the web directly in Dynamo graphs, as native types.\n\n![DynaWeb package screenshot](https://raw.githubusercontent.com/radumg/DynaWeb/master/samples/DynaWeb.png)\n\n### How it came about\n\n__DynaWeb__ was designed as a package to make other packages, so it provides building blocks enabling you to build Dynamo integrations with just about any web service out there. After making DynaSlack \u0026 DynAsana, it became clear that writing a ZeroTouch-based package for every web service I or the community would want to integrate with was simply not scalable or sustainable, no matter how much code was re-used. DynAsana is an abstracted DynaSlack and DynaWeb is an even more abstracted \u0026 modularised DynAsana.\n\n# Getting Started\n\n## Package manager\n`DynaWeb` is now available on the Dynamo package manager, search for `DynaWeb` and install it from there.\nSee [Alternative installation methods](#alternative-installation-methods) at the end of this document for alternative install methods.\n\n# Using DynaWeb\nThis repository has quite a few sample files provided to help you get started with __DynaWeb__. \n\nI highly recommed starting with the samples as they contain detailed notes and instructions on how to use each of the nodes. \nFeel free to open an issue or submit a PR if you'd like to see further some documentation added here.\n\n## Samples\nThere are 8 sample Dynamo graphs included with the package, provided in both Dynamo `1.3` XML file format and Dynamo `2.0`'s new JSON format.\n\nYou can find the samples in this repository's [`samples folder`](https://github.com/radumg/DynaWeb/tree/master/samples) folder, as well as and in the `extra` folder of the package you download using the Dynamo Package Manager, typically found here : `%appdata%\\Dynamo\\Dynamo Revit\\1.3\\packages\\DynaWeb` (note version and Revit flavour of Dynamo, your location may vary).\n\nThe samples start from super-simple and progressively increase in complexity :\n\n#### Sample 1 - A first request\n3 nodes, similar to out-of-the-box (OOTB) Dynamo experience today.\n\n#### Sample 2 - A simple request\nIntroduces the 3 stages of performing web requests and explains quite a few things. Also show how to achieve same thing with the OOTB node.\n\n#### Sample 3 - Requst + benchmarking\nSame as sample 2 but with added nodes that provide more information about the request (timing, etc) and output the results to text files.\n\n#### Sample 4 - REST API example\nThis introduces the use of the `WebClient` class and some of the basic priciples of interacting with REST services. Uses a REST API that is freely accessible and returns JSON reponses. Contrasts using a `WebClient` and a `WebRequest` to achieve same thing and also introduces `Deserialisation`.\n\n#### Sample 5 - REST API advanced\nIntroduces POST-ing to a REST API service and handling JSON payloads. Once the request is submitted, the response is deserialised too.\n\n#### Sample 6 - Complex POST request\nFurther expands on the above example, building a complex `WebRequest` with 6 steps before its execution.\n\n#### Sample 7 - Autodesk Forge - Upload file\nThis example builds a `WebRequest` and attaches a file to it, to upload directly to the `Autodesk Forge` service. See the issue that sparked this sample [here](https://github.com/radumg/DynaWeb/issues/11).\n\n#### Sample 8 - Autodesk Forge - Request auth token\nThis example builds a POST `WebRequest`, used to request an authorisation token from the `Autodesk Forge` service. See the issue that sparked this sample [here](https://github.com/radumg/DynaWeb/issues/13).\n\n\n## Structure\nThere's 5 main components in DynaWeb :\n- `WebRequest` : the web request that gets executed\n- `WebClient` : the context in which a request is executed\n- `WebResponse` : this contains the response from the server, as well as additional metadata about the response \u0026 server itself \n- `Execution` : this provides nodes that simply execute requests, making it easier \u0026 clearer to use standard http verbs such as GET, POST, etc.\n- `Helpers` : a few helper nodes, with a particular focus on `Deserialisation.`\n\nSimply put, use `WebRequest` nodes for one-off requests and start using a `WebClient` when you are interacting with REST APIs and/or have multiple request to similar endpoints/URLs.\nWhen using a `WebClient`, the `WebRequest` is still what gets executed, but it allows you more control over how that occurs (custom timeouts, etc)\n\n#### Fun facts\n- when executing a `WebRequest` on its own, the DynaWeb package constructs an empty `WebClient` in the background anyway as it's needed for execution\n- the strucuture of the source code shows up directly in Dynamo\n\n## Alternative installation methods\n\n### Manual install\nIf you prefer to install one of the more experimental/work-in-progress builds, you can still follow the instructions below.\n\n- Download the latest release from the [Releases page](https://github.com/radumg/DynaWeb/releases)\n- unzip the downloaded file\n- once unzipped, copy the `DynaWeb` folder to the location of your Dynamo packages  :\n    - `%appdata%\\Dynamo\\Dynamo Core\\1.3\\packages` for Dynamo Sandbox, replacing `1.3` with your version of Dynamo\n    - `%appdata%\\Dynamo\\Dynamo Revit\\1.3\\packages` for Dynamo for Revit, replacing `1.3` with your version of Dynamo\n- start Dynamo, the package should now be listed as `DynWWW` in the library.\n\n### Still can't see the package in Dynamo ?\n\nThis issue should be fixed now the package is distributed through the package manager, I definitely recommending getting it that way. However, in case you still have issues, see instructions below :\n\nAs [reported](https://github.com/radumg/DynaWeb/issues/10) by users, Windows sometimes blocks `.dll` files for security reasons. To resolve this, you'll have to go through the steps below for each assembly (`.dll` file) in the package :\n  1. Right-click on `.dll` file and select properties\n  2. Tick the `Unblock` checkbox at the bottom, in the Security section.\n  3. Launch Dynamo again, the package should now load.\n\n![image](https://user-images.githubusercontent.com/15014799/29770289-3c13172a-8be6-11e7-983e-6fb3c71ad136.png)\n\n### Updating from alpha-0.5 build ?\nThe changes in `1.0` are breaking, meaning graphs using the previous version will not work. However, instead of re-creating them, you can simply open the `.dyn` files using Notepad (though i recommend SublimeText) and perform the following text find/replaces :\n- replace `DSCore.Web.` with `DynaWeb.`\n- replace `DynWWW.dll` with `DynaWeb.dll`\n- replace `WebClient.WebClient` with `WebClient.ByUrl`\n\n\n## Prerequisites\n\nThis project requires the following applications or libraries be installed :\n\n```\nDynamo : version 1.3 or later\n```\n```\n.Net : version 4.5 or later\n```\n\nPlease note the project has no dependency to Revit and its APIs, so it will happily run in Dynamo Sandbox or Dynamo Studio.\n\n\n## Built with\n\nThe `DynaWeb` project relies on a few community-published NuGet packages as listed below :\n* [Newtonsoft](https://www.nuget.org/packages/newtonsoft.json/) - handles serializing and deserializing to JSON\n* [RestSharp](https://www.nuget.org/packages/RestSharp/) - enables easier interaction with REST API endpoints\n* [DynamoServices](https://www.nuget.org/packages/DynamoVisualProgramming.DynamoServices/2.0.0-beta4066) - an official Dynamo package providing support for better mapping of C# code to Dynamo nodes\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/radumg/DynWWW/blob/master/docs/CONTRIBUTING.md) for details on how to contribute to this package. Please also read the [CODE OF CONDUCT.md](https://github.com/radumg/DynWWW/blob/master/docs/CODE_OF_CONDUCT.md).\n\n## Authors\n\n__Radu Gidei__ : [Github profile](https://github.com/radumg), [Twitter profile](https://twitter.com/radugidei)\n\n## License\n\nThis project is licensed under the GNU AGPL 3.0 License - see the [LICENSE FILE](https://github.com/radumg/DynWWW/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradumg%2Fdynaweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradumg%2Fdynaweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradumg%2Fdynaweb/lists"}