Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
What are we going to create?
We are creating utility to unfurl links from webpages with ability to extend with custom logic.
https://crystal-lang.org/docs/installation/ https://crystal-lang.org/docs/ https://crystal-lang.org/api/0.25.1/
Tools:
http://crystalshards.xyz/ https://github.com/veelenga/awesome-crystal https://github.com/crystal-community/icr
./
, **
&.
is better&&
, ||
https://docs.google.com/presentation/d/1XeIRwl1Y9IUAxsFdmUmRjpLl1CrIzRgFo5wdWJrsYTc
classes:
Usage:
link = Unfurl::Link.new(uri)
link.unfurl
Configuration:
Resolver:
Unfurling:
FOR EACH resolver:
IF resolver matches uri THEN
resolve uri
IF result IS NIL THEN
return NOT_FOUND, "message"
ELSE
return OK, "url"
WHEN no resolvers found:
return ERROR, "message"
Unfurling: