Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bridges.connector.Connector Class Reference

This is a class for handling calls to the BRIDGES server to transmit JSON to the server and subsequent visualization. More...

Public Member Functions

 __init__ (self, key, username, assignment)
 Connector object constructor.
 
 set_server (self, server)
 Set the server based on a keyword for url.
 
 set_server_url (self, server_url)
 Set the server url (string) that is passed to change the server that the bridges visualization will be sent to.
 
 get_server_url (self)
 Get the server url (string)
 
 post (self, url, data)
 post the data (JSON) to the server
 
 prepare (self, url)
 prepare the post string for transmission to the server
 

Public Attributes

 key
 
 username
 
 assignment
 
 server_url
 

Static Public Attributes

str server_url_live = "http://assignments.bridgesuncc.org"
 
str server_type = "application"
 
str server_url_clone = "http://assignments-clone.bridgesuncc.org"
 
str server_url_local = "http://127.0.0.1:3000"
 
str server_url_game = "http://games.bridgesuncc.org"
 
str server_url_game_clone = "http://games-clone.bridgesuncc.org"
 
str key = ""
 
str username = ""
 
int pattern_found = 0
 
bool debug = False
 

Detailed Description

This is a class for handling calls to the BRIDGES server to transmit JSON to the server and subsequent visualization.

It is not intended for external use

Constructor & Destructor Documentation

◆ __init__()

bridges.connector.Connector.__init__ (   self,
  key,
  username,
  assignment 
)

Connector object constructor.

Parameters
keyis the user_key
usernameis students username
assignmentis the assignment number for the assignment

Member Function Documentation

◆ get_server_url()

bridges.connector.Connector.get_server_url (   self)

Get the server url (string)

Returns
return server url (string)

◆ post()

bridges.connector.Connector.post (   self,
  url,
  data 
)

post the data (JSON) to the server

Parameters
urlurl of server
dataJSON of the data structure representation

◆ prepare()

bridges.connector.Connector.prepare (   self,
  url 
)

prepare the post string for transmission to the server

Parameters
urlurl of server

◆ set_server()

bridges.connector.Connector.set_server (   self,
  server 
)

Set the server based on a keyword for url.

Parameters
serveris one of the three string keywords('live', 'clone', 'games', 'games-clone' 'local') that is passed to change the server that the bridges visualization will be sent to

◆ set_server_url()

bridges.connector.Connector.set_server_url (   self,
  server_url 
)

Set the server url (string) that is passed to change the server that the bridges visualization will be sent to.

Parameters
serveris one of the three strings ('live', 'clone', 'games', 'games-clone', 'local')

Member Data Documentation

◆ assignment

bridges.connector.Connector.assignment

◆ debug

bool bridges.connector.Connector.debug = False
static

◆ key [1/2]

str bridges.connector.Connector.key = ""
static

◆ key [2/2]

bridges.connector.Connector.key

◆ pattern_found

int bridges.connector.Connector.pattern_found = 0
static

◆ server_type

str bridges.connector.Connector.server_type = "application"
static

◆ server_url

bridges.connector.Connector.server_url

◆ server_url_clone

str bridges.connector.Connector.server_url_clone = "http://assignments-clone.bridgesuncc.org"
static

◆ server_url_game

str bridges.connector.Connector.server_url_game = "http://games.bridgesuncc.org"
static

◆ server_url_game_clone

str bridges.connector.Connector.server_url_game_clone = "http://games-clone.bridgesuncc.org"
static

◆ server_url_live

str bridges.connector.Connector.server_url_live = "http://assignments.bridgesuncc.org"
static

◆ server_url_local

str bridges.connector.Connector.server_url_local = "http://127.0.0.1:3000"
static

◆ username [1/2]

str bridges.connector.Connector.username = ""
static

◆ username [2/2]

bridges.connector.Connector.username

The documentation for this class was generated from the following file: