Deploy* API


Deploy* API Function Reference v0.7

Function Listing

Questions? Check the FAQs and "Dealing with Defaults" sections below.

*coming in later releases, but documentation on how you will be able to use it exists.

!coming in later releases and there is NO documentation on it yet.

html

Description

Creates an index.html file in the root directory

Parameters

  • HTML Type (str)[xhtml1_transitional]
    • html4_strict
    • html4_transitional
    • xhtml1_strict
    • xhtml1_transitional
    • xhtml1_1
    • html5
  • Location (str)[_root_]
  • File Name (str)[index.html]
  • Title (str)[Title]

    Note: changes the default HTML <head>'s <title>

css

Description

Creates a style.css file in the css directory

Parameters

  • CSS Type (str)[blank]
    • blank
    • resets
  • Location (str)[css]
  • File Name (str)[style.css]
  • Linking (str)[import]
    • import

      Note: Will generate <style type="text/css">@import 'filename.css';</style>

    • link

      Note: Will generate <link rel="stylesheet" href="/css/filename.css" type="text/css" media="screen" title="title" charset="utf-8">

    Note: This is how you want to link your CSS file in your HTML document.

  • Connection (str || _false_)[style.css]

    Note: Will add @imports into the specified file. If set to _false_ will add directly into the HTML file as it would with the first CSS file you create using the specified Linking method.

js

Description

Will add a script tag to your index file and create a script.js file in the js directory

Parameters

  • JS Type (str)[blank]
    • blank
    • jquery

      Note: Will add $(function(){}); to your script.js file

  • Location (str || _false_)[js]

    Note: If set to _false_ will add inline script tags to the <head> like: <script type="text/javascript"></script> but will not add the src="" attribute and create an external file

  • File Name (str || _false_)[script.js][_false_]

    WARNING: The default File Name parameter will change depending on the Location parameter. If the Location parameter is set to _false_ so will the File Name parameter and it will be unchangeable!

js_lib

Description

Will add a script tag to the Google CDN calling the requested JS library and version.

  • JS Library (str)[jquery]
    • jquery
    • jqueryui
    • prototype
    • scriptaculous
    • mootools
    • dojo
    • swfobject
    • yui
    • ext-core
  • Version (int)[1.3.2 || latest]

    Note: The first default only is set if the first default is used. If not, it will use the latest version of the library.

  • Uncompressed (boolean)[false]

    Note: Only when applicable. View Google CDN documentation for more information.

js_plugin BETA*

Description

Will add the specified plugin from the Deploy* API plugin repository

  • Plugin Name (str)[NONE]

    WARNING: This is the only function with no defaults! You must choose a plugin from the plugin repository.

  • Version (int)[latest]

    Note: The latest version of the plugin will be put as the default.

  • Hotlink (boolean)[false]

    WARNING: Set _false_ if you want to hotlink directly to the Deploy* API Repository. We do not recommend this. WE DO NOT TAKE RESPONSIBILITY FOR REPOSITORY DOWNTIME AND OUTAGES.

dir

Description

Will add a directory named "new_directory" in _root_.

  • Directory Name (str)[new_directory]
  • Location (str)[_root_]

file

Description

Will add a blank text file named "new_file.txt" in _root_

  • File Name (str)[new_file.txt]

    Note: You MUST include the extension if you specify a file name!

  • Location (str)[_root_]

img [Planned for: RC2]

Description

Will add a loading gif inside of the /images directory.

  • Image Type (str)[loading]
    • loading
    • spacer
  • Loader Type (int || _false_)[1]
    • 1 (example)
    • 2 (example)
    • 3 (example)

    Note: This is only applicable if the first parameter is set to "loading"

Dealing with Defaults

There is a default for every function's parameters in the Deploy* API except for 1 (the js_plugin function). You will have to look at the text in the brackets ([]) in the Function Listing section for function specific defaults. Here I will simply try to explain what happens with defaults in specific instances.

Location Parameters and the _root_ Variable

For location parameters you can use a special variable called _root_. _root_ means the top level directory. For example, you have a project named "My Project" you might generate a directory called my_project which therein contains children directories named "css", "js", and "images". The _root_ directory means, place this file in my_project and no deeper or higher. WARNING: the underscores are NOT optional. Setting a location parameter to "root" will result in the generation of a directory called root!

Multiple Unnamed Files

If a user/client tries to make multiple files without naming them an integer will be placed after the default name and before the extension. For example, ...&css=blank|css&css=blank|css will result in two files in the css directory named style.css and style2.css.

Parameter FAQ

What happens if a user/client specifies a non existent directory as a location?

If a user/client tries to place a file in a directory that isn't yet created, Deploy* will create it for them. This helps minimize the length of the API URL as well. For example, &html=html4_strict|mydir will create a directory called mydir and place an index.html file inside.

Does Deploy* need me to write the extension after the file name?

Yes. The file will be created with exactly the name you specify so if you want to create a typography.css file for example but omit the .css like so:
...&css=blank|css|typography
you will end up with a file in the css directory just named typography, without the .css.

Top ^