This app keeps a set of code snippets and programming resources categorized by language/library. Each snippet or resource can be associated with multiple languages and vice versa.
Features I plan to add to the backend:
Features I plan to add to the web client:
There are three main tables:
And three tables used to link these tables together:
Each of the three main tables has a corresponding API endpoint (off of the base URL webdev.neilbrommer.com/multiTable/):
Each of the endpoints is off of the base URL of https://webdev.neilbrommer.com/multiTable/. SSL is required.
Arguments that are underlined are optional.
For managing the list of languages.
Results will appear here
Each of these returns a JSON object with langID
, langName
, langDescription
,
a list of related languages
, a list of snippets
, and a list of resources
.
langID
(number): returns the specified language.
Returns the langID
of the new entry.
langName
(string), langDescription
(string), associatedLang
(number): Creates a new language with the specified information. associatedLang
is the
langID
of the language you want to link to the one being created. More languages can be linked later
via PUT
.
Returns no data.
langID
(number), langName
(string), langDescription
(string), associatedLang
(number): Modifies any provided fields for the language
specified by the langID
.
Returns no data.
langID
(number): Deletes the specified language entry, including all connections to snippets,
resources, and other languages.
langID
(number), associatedLang
(number): Removes the connection between the two
specified languages.
For managing the list of snippets.
Results will appear here
Each of these returns a JSON object with snippetID
, snippetName
,
snippetDescription
, snippet
, and a list of related languages
.
snippetID
(number): Returns the entry for the specified language.
langID
(number): Returns a list of snippets related to the given language.
Returns the snippetID
of the new snippet.
snippetName
(string), langID
(number),
snippetDescription
(string), snippet
(string):
Creates a new snippet with the given values.
Only one language can be associated with a snippet at creation. More can be added later via
PUT
.
Returns nothing
snippetID
(number), langID
(number),
snippetName
(string), snippetDescription
(string),
snippet
(string): Modifies the specified information.
Returns nothing
snippetID
(number): Deletes the entry for the specified snippet.
snippetID
(number), langID
(number): Removes the connection between
the specified snippet and language.
For managing the list of resources.
The API for resource.php is nearly identical to the one for snippet.php with resourceLink
in place of snippet
.
Results will appear here
Returns JSON encoded resources with a resourceID
, a resourceName
, a
resourceDescription
, a resourceLink
, and a list of related
languages
.
langID
(number): Returns a list of resources related to the specified language.
resourceID
(number): Returns the specified resource entry.
Returns the resourceID
of the newly created resource.
resourceName
(string), langID
(number),
resourceDescription
(string), and resourceLink
(string):
Creates a resource with the given information.
Only one language can be associated at creation. More can be added via PUT
.
Returns nothing.
resourceID
(number), resourceName
(string),
langID
(number), resourceDescription
(string), and
resourceLink
(string): Modifies the specified data for the specified
resource.
Returns nothing.
resourceID
(number): Deletes the specified resource.
resourceID
(number), langID
(number): Removes the connection between
the specified resource and language.