assignment SDK

Introduction to the ARC SDK

Release date: 2019/07/14

https://arciniega.dev/js/sdk.js

  • build ARC

    The ARC Object is the principal element of the SDK, this object displays all the objects, methods and attributes to access and work with.

    Element Type Description
    debug Attribute Used to decide if the console logs of the SDK will be displayed in the console.
    fade_element Function

    Make a fade effect into an element from the DOM.

    Basic use..

    ARC.fade_element(element);

    Parameters.

    element DOM Object
    Imports Object Contains all the functions that imports the desired libraries to your project.
    load Function

    Function that loads an HTML or URL into the desired DOM element.

    Basic use..

    ARC.load('url_to_load', element);

    Parameters.

    url String, element DOM object
    simple_ajax_get Function

    Function that returns a JSON object from a GET call to an API, can be asynchronous.

    Basic use..

    ARC.simple_ajax_get('get_url', json_data, false);

    Parameters.

    url String, json_data JSON object, async boolean
    slider Function

    Function that renders a slider into the indicated div.

    Basic use..

    ARC.slider(pictures_array, 'sample_div');

    Parameters.

    pictures_array array, div_container string, slider_index = 0 int,
    timer = 0 int, display_dots = false boolean, display_arrows = false boolean,
    display_counter = false boolean, captions = [] array
  • whatshot Firebase

    The Firebase Object contains the general Firebase functions simplified. [Requires ARC.Imports.Firebase()]

    Need a created Firebase project, and a web app ready to get the API key and project id.

    https://firebase.google.com/docs/projects/learn-more
    Element Type Description
    init Function

    Initialize the Firebase service, necessary to run all the Firebase calls.

    Basic use..

    Firebase.init('api-key', 'project-id');

    Parameters.

    apikey String, project_id String
    google_login Function

    Function to call to the Google login modal screen, and lets the user sign in with their Gmail account.

    https://firebase.google.com/docs/auth/web/google-signin

    Basic use..

    Firebase.google_login();

    Parameters.

    reload boolean
    login_observer Function

    Function that detects if the user is currently logged in the site, can call to an autologin and select your preferred login method.

    https://firebase.google.com/docs/auth/web/start?authuser=0#set_an_authentication_state_observer_and_get_user_data

    Basic use..

    Firebase.login_observer(true, 'Google');

    Parameters.

    auto_login boolean, login_provider String
  • brush MaterializeCSS

    The Materialize Object has simplified functions from MaterializeCSS. [Requires ARC.Imports.MaterializeCSS()]

    https://materializecss.com/
    Element Type Description
    init_sidebar Function

    Function that initializes a sidebar.

    https://materializecss.com/sidenav

    Basic use..

    Materialize.init_sidebar('sidebar_class', ...options);

    Parameters.

    sidebar_class String, ...options Array