Importing Collection
Once you have Velosimo running locally you can start importing collections.
First, you need to create a translator that will let you import all collections and data.
See Transforms > Parsers for more information.
Write a namespace and a name in style select Ruby.
In code write this:
if (parsed_data = JSON.parse(data)).is_a?(Array)
parsed_data.each { |item| target_data_type.create_from_json!(item) }
else
target_data_type.create_from_json!(parsed_data)
end
Then save it.
Now you can import collections using the translator you have already created.
Example: Importing Basic collections
-
Export Basic collection. In Velosimo.io search Basic cross collection and select the Export option. In translator select JSON Portable Exporter [Shared].
-
Import Basic collection. In your local Velosimo, go to Collections/Shared Collections/All and select Import option. There select the translator you have just created and import the collection. You can see it on Collections/Shared Collections/All.