apiverve_variablenameconverter 1.2.7
apiverve_variablenameconverter: ^1.2.7 copied to clipboard
Variable Name Converter transforms variable names between different naming conventions including camelCase, snake_case, PascalCase, and kebab-case. Punctuation that cannot appear in an identifier, suc [...]
Variable Name Converter API - Dart/Flutter Client #
Variable Name Converter transforms variable names between different naming conventions including camelCase, snake_case, PascalCase, and kebab-case. Punctuation that cannot appear in an identifier, such as the parentheses in Order Total ($), separates words and is dropped, so spreadsheet headers convert cleanly.
This is the Dart/Flutter client for the Variable Name Converter API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_variablenameconverter: ^1.2.7
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage #
import 'package:apiverve_variablenameconverter/apiverve_variablenameconverter.dart';
void main() async {
final client = VariablenameconverterClient('YOUR_API_KEY');
try {
final response = await client.execute({
'variables': myVariableName,another_var_name,SomeClassName,kebab-case-name,CONSTANT_VALUE,
'to': 'snake_case'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response #
{
"status": "ok",
"error": null,
"data": {
"results": [
{
"original": "myVariableName",
"converted": "my_variable_name"
},
{
"original": "another_var_name",
"converted": "another_var_name"
},
{
"original": "SomeClassName",
"converted": "some_class_name"
},
{
"original": "kebab-case-name",
"converted": "kebab_case_name"
},
{
"original": "CONSTANT_VALUE",
"converted": "c_o_n_s_t_a_n_t__v_a_l_u_e"
}
],
"count": 5,
"targetFormat": "snake_case"
}
}
API Reference #
- API Home: Variable Name Converter API
- Documentation: docs.apiverve.com/ref/variablenameconverter
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve