Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1453 posts 1874 karma points
    Mar 06, 2012 @ 16:04
    Gordon Saxby
    0

    Program to transfer from A to B using API

    I am just starting to investigate the Courier API / documentation / etc as I am looking to write a limited transfer system.

    It needs to deal with one section / document type (at least, currently it does!) and transfer only one way. This woud be an automated process. Also I only want to transfer documents, their data and media (images, PDFs, video). I do not want to copy datatypes, templates, etc via this system.

    So, how hard does that sound?! :-) Is it all perfectly easily achievable with the API? All comments and suggestions welcome.

    Unfortunately, it does look like I will need to write a custom Item provider as the site has one custom built data type.

  • Per Ploug 865 posts 3491 karma points MVP admin
    Mar 06, 2012 @ 16:09
    Per Ploug
    0

    Hi Gordon

    Yeah its doable, check the source code for the ExtractionConsole, that basicly does the transfer part for you.

    Now you also want filtering of the items you want to to transfer, which you can also do. 

    http://nightly.umbraco.org/UmbracoCourier/samples/Umbraco.Courier.ConsoleApplicationSource.zip ;

    The RevisionPackaging/RevisionExtractopm has a Filters property, which allows you to add Item and provider ids you wish for it to ignore

    And, finally you also want it to only transfer documents of a certain type. You will need to implement a simple dataresolver to cancel out anythign that is not of that type.

    For custom data type, it all depends on how the data is stored, and referenced, to actually determine if you need a custom provider, but I doubt that you can't just use a simple resolver for this as well.

    http://nightly.umbraco.org/UmbracoCourier/Data%20Resolvers.pdf

  • Gordon Saxby 1453 posts 1874 karma points
    Mar 06, 2012 @ 16:50
    Gordon Saxby
    0

    Thanks for the pointers, Per.

    The "custom" datatype is extremely similar to the "Auto Complete" component from uComponents ... I need to investigate more to find out what it does with it's data.

Please Sign in or register to post replies

Write your reply to:

Draft