class LinkShort::Linker

Overview

The representation of the shortcut resource

Defined in:

linker.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_h(data : Hash(String, JSON::Any | String), uri : String, linkshort : LinkShort) : Linker #

Parse a Linker object from a Hash


[View source]
def self.new(short : String, uri : String, destination : String, linkshort : LinkShort, token : String = "") #

[View source]

Instance Method Detail

def active? : Bool #

Check wether the shorcut can still be used


[View source]
def delete #

Shorcut for Linker.delete


[View source]
def destination : String #

Get the #destination property


[View source]
def destination=(destination : String) #

Edit the destination via the assignment operator


[View source]
def edit(destination : String) #

Shorcut for LinkShort.edit


[View source]
def empty? #

Check wether this object is empty


[View source]
def original? : Bool #

Check wether this object is the original one and can be edited


[View source]
def secure? : Bool #

Check wether the destination URI has https or not


[View source]
def set_destination(destination : String) : String #

Change the value of the destination property without triggering the #edit function


[View source]
def short : String #

Get the #short property


[View source]
def short=(short : String) #

Set the #short property


[View source]
def shortcut_url : String #

Returns the shorctu url, with which the shortcut can be used


[View source]
def to_json #

Returns the JSON representation of this object


[View source]
def token : String #

Get the #token property


[View source]
def uri : String #

Get the #uri property


[View source]